@@ -1907,14 +1907,13 @@ def test_emscripten_get_now(self):
1907
1907
self .do_runf ('test_emscripten_get_now.c' , 'Timer resolution is good' )
1908
1908
1909
1909
def test_emscripten_get_compiler_setting (self ):
1910
- src = test_file ('core/emscripten_get_compiler_setting.c' )
1911
- output = shared .replace_suffix (src , '.out' )
1912
- # with assertions, a nice message is shown
1913
- self .set_setting ('ASSERTIONS' )
1914
- self .do_runf (src , 'You must build with -sRETAIN_COMPILER_SETTINGS' , assert_returncode = NON_ZERO )
1915
- self .clear_setting ('ASSERTIONS' )
1916
- self .set_setting ('RETAIN_COMPILER_SETTINGS' )
1917
- self .do_runf (src , read_file (output ).replace ('waka' , utils .EMSCRIPTEN_VERSION ))
1910
+ expected = read_file (test_file ('core/emscripten_get_compiler_setting.out' ))
1911
+ expected = expected .replace ('waka' , utils .EMSCRIPTEN_VERSION )
1912
+ self .do_runf ('core/emscripten_get_compiler_setting.c' , expected , cflags = ['-sRETAIN_COMPILER_SETTINGS' ])
1913
+
1914
+ def test_emscripten_get_compiler_setting_error (self ):
1915
+ # with assertions, a runtime error is shown if you try to use the API without RETAIN_COMPILER_SETTINGS
1916
+ self .do_runf ('core/emscripten_get_compiler_setting.c' , 'You must build with -sRETAIN_COMPILER_SETTINGS' , '-sASSERTIONS' , assert_returncode = NON_ZERO )
1918
1917
1919
1918
@no_esm_integration ('WASM_ESM_INTEGRATION is not compatible with ASYNCIFY=1' )
1920
1919
def test_emscripten_has_asyncify (self ):
0 commit comments