diff options
Diffstat (limited to 'test/example/cpp-unit.cpp')
-rw-r--r-- | test/example/cpp-unit.cpp | 18 |
1 files changed, 18 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; +} |