diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-28 14:21:45 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:03 -0700 |
commit | 11db72239d48da525e0978a608e4cdfb91168981 (patch) | |
tree | ccb07b0571c8b4305544eeb4e333ceb224f4f3f3 /tests/runner.py | |
parent | 0de466d64e4cf3e8466c03731f18012688d5ea78 (diff) |
apply replacements to module defs, and add testing for merging of overlapping global initializers
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 3bd39036..a1cec46e 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10668,6 +10668,23 @@ f.close() void nothing() {} ''', 'a new Class\n') + # Multiple global initializers (LLVM generates overlapping names for them) + test('global inits', r''' + #include <stdio.h> + struct Class { + Class(const char *name) { printf("new %s\n", name); } + }; + ''', r''' + #include "header.h" + static Class c("main"); + int main() { + return 0; + } + ''', r''' + #include "header.h" + static Class c("side"); + ''', ['new main\nnew side\n', 'new side\nnew main\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.') |