@@ -11946,7 +11946,7 @@ def update_and_print_diff(key, actual, expected):
11946
11946
if total_output_size < total_expected_size:
11947
11947
print(f'Hey amazing, overall generated code size was improved by {total_expected_size - total_output_size} bytes!')
11948
11948
print('If this is expected, rerun the test with --rebaseline to update the expected sizes')
11949
- self.assertDictEqual (obtained_results, expected_results)
11949
+ self.assertEqual (obtained_results, expected_results)
11950
11950
11951
11951
# Tests the library_c_preprocessor.js functionality.
11952
11952
@crossplatform
@@ -12378,9 +12378,13 @@ def test_main_reads_params(self):
12378
12378
# otherwise in such a trivial program).
12379
12379
self.assertLess(no, 0.95 * yes)
12380
12380
12381
+ def test_small_js_flags(self):
12382
+ self.emcc('browser_test_hello_world.c', '0', cflags=['-O3', '--closure=1', '-sINCOMING_MODULE_JS_API=[]', '-sENVIRONMENT=web', '--output-eol=linux'])
12383
+ self.check_output_sizes('a.out.js')
12384
+
12381
12385
def test_INCOMING_MODULE_JS_API(self):
12382
12386
def test(args):
12383
- self.run_process([EMCC, test_file('hello_world.c'), '-O3', '--closure=1', '-sENVIRONMENT=web ', '--output-eol=linux'] + args)
12387
+ self.run_process([EMCC, test_file('hello_world.c'), '-O3', '--closure=1', '-sENVIRONMENT=node,shell ', '--output-eol=linux'] + args)
12384
12388
for engine in config.JS_ENGINES:
12385
12389
self.assertContained('hello, world!', self.run_js('a.out.js', engine=engine))
12386
12390
return os.path.getsize('a.out.js')
0 commit comments