diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-10 13:36:13 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-10 13:36:13 -0800 |
commit | 008d2433826b0ac7d4bdd5556bd4c6b4f1351c73 (patch) | |
tree | 078b3d833e98d3dd21bce1fbc6bd87b64516f356 /tests | |
parent | bbefb9fb22982d5ed712f8eb9664fef8d278c4b1 (diff) |
more i64 fixes and tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index ca38d000..acee1983 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -403,6 +403,14 @@ if 'benchmark' not in str(sys.argv): return test > 5 ? 0x0000def123450123ULL : 0ULL; } + void modifier1(int64_t t) { + t |= 12; + printf("m1: %Ld\n", t); + } + void modifier2(int64_t &t) { + t |= 12; + } + int main() { int64_t x1 = 0x1234def123450789ULL; @@ -411,11 +419,19 @@ if 'benchmark' not in str(sys.argv): printf("*%Ld\n%d,%d,%d,%d,%d\n%d,%d,%d,%d,%d*\n", x1, x1==x2, x1<x2, x1<=x2, x1>x2, x1>=x2, // note: some rounding in the printing! x1==x3, x1<x3, x1<=x3, x1>x3, x1>=x3); printf("*%Ld*\n", returner1()); - //printf("*%Ld*\n", returner2(30)); + printf("*%Ld*\n", returner2(30)); + + // Make sure in params are not modified + int64_t t = 123; + modifier1(t); + printf("*%Ld*\n", t); + modifier2(t); + printf("*%Ld*\n", t); return 0; } ''' - self.do_run(src, '*1311918518731868200\n0,0,0,1,1\n1,0,1,0,1*\n*245127260211081*\n') + self.do_run(src, '*1311918518731868200\n0,0,0,1,1\n1,0,1,0,1*\n*245127260211081*\n*245127260209443*\n' + + 'm1: 127\n*123*\n*127*\n') def test_unsigned(self): |