diff options
author | alon@honor <none@none> | 2010-10-23 17:48:34 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-10-23 17:48:34 -0700 |
commit | e4b1cfc027f7e0ebb21a423d2bd763b17e9b88b3 (patch) | |
tree | 441560259535d75cb937c8babd000d978bc9bd91 /tests | |
parent | 13bec340b6137fa1cb4549c1f92b4ef2bcc66580 (diff) |
handle llvm functions in ret
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 54836ee7..67e3cfba 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -678,6 +678,22 @@ if 'benchmark' not in sys.argv: ''' self.do_test(src, '*2,2,5,8,8***8,8,5,8,8***7,2,6,990,7,2*', [], lambda x: x.replace('\n', '*')) + def test_tinyfuncstr(self): + src = ''' + #include <stdio.h> + + struct Class { + static char *name1() { return "nameA"; } + char *name2() { return "nameB"; } + }; + + int main() { + printf("*%s,%s*\\n", Class::name1(), (new Class())->name2()); + return 0; + } + ''' + self.do_test(src, '*nameA,nameB*') + def test_llvmswitch(self): src = ''' #include <stdio.h> |