aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-07-04 12:17:06 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-07-04 12:17:06 -0700
commit1aeee076cf70038b44ca84f9565bfb16d1401d87 (patch)
tree42e8b8ee92c6f54a32dae4ef3df4becdb84e6c66 /tests
parenta4262aa2c9028145516c1a23cbdc6b7b8a42b353 (diff)
ensure binding functions are not DFE'd away
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 318187f2..beef1823 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1646,7 +1646,6 @@ if 'benchmark' not in sys.argv:
expected = open(path_from_root('tests', 'time', 'output.txt'), 'r').read()
self.do_test(src, expected)
-
def test_statics(self):
# static initializers save i16 but load i8 for some reason
global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g']
@@ -2612,7 +2611,15 @@ if 'benchmark' not in sys.argv:
basename = os.path.join(self.get_dir(), 'bindingtest')
Popen(['python', BINDINGS_GENERATOR, basename, header_filename], stdout=PIPE, stderr=STDOUT).communicate()[0]
- src = src + '\n#include "bindingtest.c"\n'
+ src = '''
+ #include "header.h"
+
+ ScriptMe::ScriptMe(int val) : value(val) { }
+ int ScriptMe::getVal() { return value; }
+ void ScriptMe::mulVal(int mul) { value *= mul; }
+
+ #include "bindingtest.c"
+ '''
script_src_2 = '''
var sme = new ScriptMe(83);