summaryrefslogtreecommitdiff
path: root/test/example/c-api-kitchen-sink.c
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-05-29 15:08:55 -0700
committerGitHub <noreply@github.com>2019-05-29 15:08:55 -0700
commitb60dad3428ae61efe8ed38d0f2ad5a45081d4c39 (patch)
tree09b085192af5ed706df3f621f64d277deebb8f5f /test/example/c-api-kitchen-sink.c
parent4b05489435a8f7c4a149db16a11f6c82ce63d622 (diff)
downloadbinaryen-b60dad3428ae61efe8ed38d0f2ad5a45081d4c39.tar.gz
binaryen-b60dad3428ae61efe8ed38d0f2ad5a45081d4c39.tar.bz2
binaryen-b60dad3428ae61efe8ed38d0f2ad5a45081d4c39.zip
Add Features.MVP and Features.All to binaryen.js (#2148)
This adds `Features.MVP` and `Features.All` to binaryen.js and make test cases use it.
Diffstat (limited to 'test/example/c-api-kitchen-sink.c')
-rw-r--r--test/example/c-api-kitchen-sink.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 43069c865..e0b4a5ec4 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -161,6 +161,7 @@ void test_types() {
}
void test_features() {
+ printf("BinaryenFeatureMVP: %d\n", BinaryenFeatureMVP());
printf("BinaryenFeatureAtomics: %d\n", BinaryenFeatureAtomics());
printf("BinaryenFeatureBulkMemory: %d\n", BinaryenFeatureBulkMemory());
printf("BinaryenFeatureMutableGlobals: %d\n", BinaryenFeatureMutableGlobals());
@@ -168,6 +169,7 @@ void test_features() {
printf("BinaryenFeatureSignExt: %d\n", BinaryenFeatureSignExt());
printf("BinaryenFeatureSIMD128: %d\n", BinaryenFeatureSIMD128());
printf("BinaryenFeatureExceptionHandling: %d\n", BinaryenFeatureExceptionHandling());
+ printf("BinaryenFeatureAll: %d\n", BinaryenFeatureAll());
}
void test_core() {
@@ -521,13 +523,7 @@ void test_core() {
// A bunch of our code needs drop(), auto-add it
BinaryenModuleAutoDrop(module);
- BinaryenFeatures features =
- BinaryenFeatureAtomics() |
- BinaryenFeatureBulkMemory() |
- BinaryenFeatureNontrappingFPToInt() |
- BinaryenFeatureSignExt() |
- BinaryenFeatureSIMD128();
-
+ BinaryenFeatures features = BinaryenFeatureAll();
BinaryenModuleSetFeatures(module, features);
assert(BinaryenModuleGetFeatures(module) == features);