diff options
-rwxr-xr-x | check.py | 3 | ||||
-rw-r--r-- | src/wasm.h | 1 | ||||
-rw-r--r-- | test/emcc_hello_world.wast | 44 | ||||
-rw-r--r-- | test/hello_world.wast | 2 |
4 files changed, 24 insertions, 26 deletions
@@ -34,8 +34,7 @@ for asm in tests: raise Exception('output .wast file does not exist') expected = open(os.path.join('test', wasm)).read() if actual != expected: - raise Exception("Expected to have '%s' == '%s', diff:\n\n%s" % ( - expected, actual, + raise Exception("incorrect output, diff:\n\n%s" % ( ''.join([a.rstrip()+'\n' for a in difflib.unified_diff(expected.split('\n'), actual.split('\n'), fromfile='expected', tofile='actual')]) )) diff --git a/src/wasm.h b/src/wasm.h index ec2f56ec4..87e18c7ba 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -743,7 +743,6 @@ public: std::ostream& print(std::ostream &o, unsigned indent) { printOpening(o, "export") << ' '; - name.print(o) << ' '; printText(o, name.str) << ' '; value.print(o); o << ')'; diff --git a/test/emcc_hello_world.wast b/test/emcc_hello_world.wast index a7f93b277..ec4769a6d 100644 --- a/test/emcc_hello_world.wast +++ b/test/emcc_hello_world.wast @@ -21,28 +21,28 @@ (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) (import $nullFunc_vi "env" "nullFunc_vi" (param i32)) - (export $_i64Subtract "_i64Subtract" $_i64Subtract) - (export $_free "_free" $_free) - (export $_main "_main" $_main) - (export $_i64Add "_i64Add" $_i64Add) - (export $_memset "_memset" $_memset) - (export $_malloc "_malloc" $_malloc) - (export $_memcpy "_memcpy" $_memcpy) - (export $_bitshift64Lshr "_bitshift64Lshr" $_bitshift64Lshr) - (export $_fflush "_fflush" $_fflush) - (export $___errno_location "___errno_location" $___errno_location) - (export $_bitshift64Shl "_bitshift64Shl" $_bitshift64Shl) - (export $runPostSets "runPostSets" $runPostSets) - (export $stackAlloc "stackAlloc" $stackAlloc) - (export $stackSave "stackSave" $stackSave) - (export $stackRestore "stackRestore" $stackRestore) - (export $establishStackSpace "establishStackSpace" $establishStackSpace) - (export $setThrew "setThrew" $setThrew) - (export $setTempRet0 "setTempRet0" $setTempRet0) - (export $getTempRet0 "getTempRet0" $getTempRet0) - (export $dynCall_ii "dynCall_ii" $dynCall_ii) - (export $dynCall_iiii "dynCall_iiii" $dynCall_iiii) - (export $dynCall_vi "dynCall_vi" $dynCall_vi) + (export "_i64Subtract" $_i64Subtract) + (export "_free" $_free) + (export "_main" $_main) + (export "_i64Add" $_i64Add) + (export "_memset" $_memset) + (export "_malloc" $_malloc) + (export "_memcpy" $_memcpy) + (export "_bitshift64Lshr" $_bitshift64Lshr) + (export "_fflush" $_fflush) + (export "___errno_location" $___errno_location) + (export "_bitshift64Shl" $_bitshift64Shl) + (export "runPostSets" $runPostSets) + (export "stackAlloc" $stackAlloc) + (export "stackSave" $stackSave) + (export "stackRestore" $stackRestore) + (export "establishStackSpace" $establishStackSpace) + (export "setThrew" $setThrew) + (export "setTempRet0" $setTempRet0) + (export "getTempRet0" $getTempRet0) + (export "dynCall_ii" $dynCall_ii) + (export "dynCall_iiii" $dynCall_iiii) + (export "dynCall_vi" $dynCall_vi) (table $b2 $___stdio_close $___stdout_write $___stdio_seek $___stdio_write $_cleanup $b2 $b2) (func $stackAlloc (param $size i32) (result i32) (local $ret i32) diff --git a/test/hello_world.wast b/test/hello_world.wast index ed275686b..95d84116b 100644 --- a/test/hello_world.wast +++ b/test/hello_world.wast @@ -1,5 +1,5 @@ (module - (export $add "add" $add) + (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (i32.add (get_local $x) |