aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-25 10:35:35 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-25 10:38:30 -0700
commitf15efa8d3425c163c4d5f3b54190cb4806298752 (patch)
tree636ebfa2c8f9699ad0de1764e3b608eb45a486d4
parent39ea986557d18803c6ea60a65149a62b17f40f51 (diff)
tiny bit more embind testing
-rwxr-xr-xtests/runner.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index c717e021..ae91348f 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -8693,11 +8693,15 @@ def process(filename):
int main() {
val Math = val::global("Math");
+
+ // two ways to call Math.abs
printf("abs(-10): %d\n", Math.call<int>("abs", -10));
+ printf("abs(-11): %d\n", Math["abs"](-11).as<int>());
+
return 0;
}
'''
- self.do_run(src, 'abs(-10): 10');
+ self.do_run(src, 'abs(-10): 10\nabs(-11): 11');
def test_scriptaclass(self):
if self.emcc_args is None: return self.skip('requires emcc')