aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-11-14 21:23:48 -0800
committerAlon Zakai <azakai@mozilla.com>2010-11-14 21:23:48 -0800
commitee0166c83cd91a469bbe2d1da3c27f180da7b582 (patch)
treeca61137046a01c43e3579c93ef9bc5a0cee4a7a3 /tests
parent1a9c1c95c6552f835f53493299e90a9f6743c6f7 (diff)
handle global constants that are llvm function calls +test
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ecabe9eb..2a988f8c 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -369,6 +369,23 @@ if 'benchmark' not in sys.argv:
'''
self.do_test(src, '*7*')
+ def test_globals(self):
+ src = '''
+ #include <stdio.h>
+
+
+ char cache[256], *next = cache;
+
+ int main()
+ {
+ cache[10] = 25;
+ next[20] = 51;
+ printf("*%d,%d*\\n", next[10], cache[20]);
+ return 0;
+ }
+ '''
+ self.do_test(src, '*25,51*')
+
def test_linked_list(self):
src = '''
#include <stdio.h>