diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-12 23:02:24 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-12 23:02:24 -0400 |
commit | 9dc3dea276c2cc045a77dfbf2734fe85207c3452 (patch) | |
tree | b427c3bbc2cafcb2f5890774ee2b0932752e18c4 /tests | |
parent | ec2f3f213e4abce5cef3131673d969ca9d3c534c (diff) |
fixed problems with varargs
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test.sh | 2 | ||||
-rw-r--r-- | tests/varargs.toc | 4 | ||||
-rw-r--r-- | tests/varargs_expected | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/tests/test.sh b/tests/test.sh index ac195bc..5b2cb14 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,13 +1,13 @@ #!/bin/bash tests='bf -varargs arr arr2 arr3 foreign params nms +varargs misc' STARTPWD=$(pwd) diff --git a/tests/varargs.toc b/tests/varargs.toc index 7ffb758..8709a64 100644 --- a/tests/varargs.toc +++ b/tests/varargs.toc @@ -8,7 +8,7 @@ sum ::= fn(x: ..) int { total := 0; n := 0; for a, i := x { - total += a + i / i; + total += a + i - i + 1; n += 1; } total - n @@ -18,7 +18,7 @@ sumc ::= fn(x:: ..) int { total := 0; n := 0; for a, i := x { - total += a + i / i; + total += a + i - i + 1; n += 1; } total - n diff --git a/tests/varargs_expected b/tests/varargs_expected index 5436134..29c273c 100644 --- a/tests/varargs_expected +++ b/tests/varargs_expected @@ -6,4 +6,3 @@ 4 11111 11111 - |