diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-03-03 16:34:10 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-03-03 16:34:10 -0800 |
commit | 4d94ef65a6e9fc7bd4634e871e50fdda08c227a6 (patch) | |
tree | 245226e9446ffa33224c8ed240f40e841c628abf /tests/test_other.py | |
parent | 7f45922c7ffa3c8591344b2851373c70a4bf05ae (diff) |
forward assertions setting into backend, and test checking for invalid # of args in static calls
Diffstat (limited to 'tests/test_other.py')
-rw-r--r-- | tests/test_other.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py index 2fecf09e..8eb6ce4a 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -2542,3 +2542,13 @@ int main() for e in expected: self.assertContained(e, output) + def test_incorrect_static_call(self): + for opts in [0, 1]: + for asserts in [0, 1]: + extra = [] + if opts != 1-asserts: extra = ['-s', 'ASSERTIONS=' + str(asserts)] + cmd = [PYTHON, EMCC, path_from_root('tests', 'cases', 'sillyfuncast2.ll'), '-O' + str(opts)] + extra + print cmd + stdout, stderr = Popen(cmd, stderr=PIPE).communicate() + assert ('''unexpected number of arguments 3 in call to 'doit', should be 2''' in stderr) == asserts, stderr + |