diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/cpp-unit.cpp | 18 | ||||
-rw-r--r-- | test/example/cpp-unit.txt | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/example/cpp-unit.cpp b/test/example/cpp-unit.cpp new file mode 100644 index 000000000..f51ca72b6 --- /dev/null +++ b/test/example/cpp-unit.cpp @@ -0,0 +1,18 @@ +// test multiple uses of the threadPool + +#include <assert.h> + +#include <wasm.h> +#include <ir/cost.h> + +using namespace wasm; + +int main() +{ + // Some optimizations assume that the cost of a get is zero, e.g. local-cse. + GetLocal get; + assert(CostAnalyzer(&get).cost == 0); + + std::cout << "Success.\n"; + return 0; +} diff --git a/test/example/cpp-unit.txt b/test/example/cpp-unit.txt new file mode 100644 index 000000000..a9d787cc5 --- /dev/null +++ b/test/example/cpp-unit.txt @@ -0,0 +1 @@ +Success. |