aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-28 13:46:11 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-03 15:31:03 -0700
commit585b3d76eeb784fb091333e9ddedf51becb234ea (patch)
tree1be3393f3ec7e916f9c56dd121c3540b6895598d /tests/runner.py
parentfd36ac8a809004ef369dd45e8096ee9e223b2a10 (diff)
merge global initializers
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 8944f621..3bd39036 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -10654,6 +10654,20 @@ f.close()
void sidey() { printf("hello from side\n"); }
''', 'hello from main\nhello from side\n')
+ # Global initializer
+ test('global init', '', r'''
+ #include <stdio.h>
+ struct Class {
+ Class() { printf("a new Class\n"); }
+ };
+ static Class c;
+ int main() {
+ return 0;
+ }
+ ''', r'''
+ void nothing() {}
+ ''', 'a new Class\n')
+
def test_symlink(self):
if os.name == 'nt':
return self.skip('Windows FS does not need to be tested for symlinks support, since it does not have them.')