@@ -63,13 +63,15 @@ function test_types() {
6363}
6464
6565function test_features ( ) {
66+ console . log ( "Binaryen.Features.MVP: " + Binaryen . Features . MVP ) ;
6667 console . log ( "Binaryen.Features.Atomics: " + Binaryen . Features . Atomics ) ;
6768 console . log ( "Binaryen.Features.BulkMemory: " + Binaryen . Features . BulkMemory ) ;
6869 console . log ( "Binaryen.Features.MutableGlobals: " + Binaryen . Features . MutableGlobals ) ;
6970 console . log ( "Binaryen.Features.NontrappingFPToInt: " + Binaryen . Features . NontrappingFPToInt ) ;
7071 console . log ( "Binaryen.Features.SignExt: " + Binaryen . Features . SignExt ) ;
7172 console . log ( "Binaryen.Features.SIMD128: " + Binaryen . Features . SIMD128 ) ;
7273 console . log ( "Binaryen.Features.ExceptionHandling: " + Binaryen . Features . ExceptionHandling ) ;
74+ console . log ( "Binaryen.Features.All: " + Binaryen . Features . All ) ;
7375}
7476
7577function test_ids ( ) {
@@ -464,13 +466,7 @@ function test_core() {
464466 // A bunch of our code needs drop, auto-add it
465467 module . autoDrop ( ) ;
466468
467- var features =
468- Binaryen . Features . Atomics |
469- Binaryen . Features . BulkMemory |
470- Binaryen . Features . NontrappingFPToInt |
471- Binaryen . Features . SignExt |
472- Binaryen . Features . SIMD128 ;
473-
469+ var features = Binaryen . Features . All ;
474470 module . setFeatures ( features ) ;
475471 assert ( module . getFeatures ( ) == features ) ;
476472
@@ -759,6 +755,9 @@ function test_parsing() {
759755
760756 // create a module and write it to text
761757 module = new Binaryen . Module ( ) ;
758+
759+ module . setFeatures ( Binaryen . Features . All ) ;
760+
762761 var iii = module . addFunctionType ( "iii" , Binaryen . i32 , [ Binaryen . i32 , Binaryen . i32 ] ) ;
763762 var x = module . local . get ( 0 , Binaryen . i32 ) ,
764763 y = module . local . get ( 1 , Binaryen . i32 ) ;
0 commit comments