diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-26 17:37:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-26 17:37:23 -0700 |
commit | 7a71deddd2ef5bf7261019b5551e35a7eee7216e (patch) | |
tree | 3d66c7f5e569882d0d5a318b6729712b715edf41 | |
parent | 0003a868648a69b6b02d3cdced29fee8feab56fe (diff) |
fix test_warn_undefined
-rw-r--r-- | src/jsifier.js | 2 | ||||
-rwxr-xr-x | tests/runner.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 2c0332e3..32c224b7 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -487,7 +487,7 @@ function JSify(data, functionsOnly, givenFunctions) { } else { // If this is not linkable, anything not in the library is definitely missing if (!LINKABLE && !LibraryManager.library.hasOwnProperty(shortident) && !LibraryManager.library.hasOwnProperty(shortident + '__inline')) { - if (VERBOSE) printErr('warning: missing function: ' + shortident); + if (VERBOSE || WARN_ON_UNDEFINED_SYMBOLS) printErr('warning: unresolved symbol: ' + shortident); LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);"); } item.JS = addFromLibrary(shortident); diff --git a/tests/runner.py b/tests/runner.py index 3e2e4471..1d9a2179 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10214,10 +10214,10 @@ f.close() } ''') output = Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp'), '-s', 'WARN_ON_UNDEFINED_SYMBOLS=1'], stderr=PIPE).communicate() - self.assertContained('Unresolved symbol: _something', output[1]) + self.assertContained('unresolved symbol: something', output[1]) output = Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp')], stderr=PIPE).communicate() - self.assertNotContained('Unresolved symbol: _something\n', output[1]) + self.assertNotContained('unresolved symbol: something\n', output[1]) def test_toobig(self): open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(r''' |