diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-05-15 08:04:34 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-05-15 08:04:34 -0700 |
commit | 3afb3d53d70c6d9a3e84e488cfa986b8cd7b2733 (patch) | |
tree | afbc41358a13cfe329ddeae93f6ab4f6f7c57ef2 /tests/runner.py | |
parent | f66293c6affe4e4c4ddb5ec40dff802dee989094 (diff) |
indexize necessary library functions
Diffstat (limited to 'tests/runner.py')
-rw-r--r-- | tests/runner.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py index 4ce0746d..a2864aac 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -969,6 +969,8 @@ if 'benchmark' not in sys.argv: fp_t globally1 = calc1; fp_t globally2 = calc2; + int nothing(const char *str) { return 0; } + int main() { fp_t fp = calc1; @@ -983,10 +985,17 @@ if 'benchmark' not in sys.argv: printf("*%d,%d", t == calc1, t == calc2); t = calc2; printf(",%d,%d*\\n", t == calc1, t == calc2); + + int (*other)(const char *str); + other = nothing; + other("*hello!*"); + other = puts; + other("*goodbye!*"); + return 0; } ''' - self.do_test(src, '*26,26,90,90,26,90*\n*1,0,0,1*') + self.do_test(src, '*26,26,90,90,26,90*\n*1,0,0,1*\n*goodbye!*') def test_emptyclass(self): src = ''' |