aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-07-28 20:54:10 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-07-28 20:54:10 -0700
commit8f1d44960ca717d49837c44e1c5227966af84b43 (patch)
treec88ecf38b53a1ce73144afb552625c07f85d5832 /tests
parent943f5a9c567d8c273334c2651183024b6cbe4eb4 (diff)
if generateStructInfo gets invalid data, return null, do not throw: possibly duplicate struct names, and it is ok to return null
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 26110b59..39091474 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -5143,6 +5143,19 @@ int main(int argc, char **argv) {
}
'''
self.do_run(src, 'value:10')
+
+ def test_fakestat(self):
+ src = r'''
+ #include <stdio.h>
+ struct stat { int x, y; };
+ int main() {
+ stat s;
+ s.x = 10;
+ s.y = 22;
+ printf("*%d,%d*\n", s.x, s.y);
+ }
+ '''
+ self.do_run(src, '*10,22*')
def test_mmap(self):
src = '''