From 5007870b52aa549971824959a55ad3bb886f09e0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Sep 2018 16:37:32 +0200 Subject: Rename .test/test{} to .testscript/testscript{} --- tests/loop/buildfile | 2 +- tests/loop/for.test | 112 ---------------------------------------------- tests/loop/for.testscript | 112 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 tests/loop/for.test create mode 100644 tests/loop/for.testscript (limited to 'tests/loop') diff --git a/tests/loop/buildfile b/tests/loop/buildfile index e583492..3807ddf 100644 --- a/tests/loop/buildfile +++ b/tests/loop/buildfile @@ -2,4 +2,4 @@ # copyright : Copyright (c) 2014-2018 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -./: test{*} $b +./: testscript{*} $b diff --git a/tests/loop/for.test b/tests/loop/for.test deleted file mode 100644 index 66bfc80..0000000 --- a/tests/loop/for.test +++ /dev/null @@ -1,112 +0,0 @@ -# file : tests/loop/for.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -# Test for-loop. - -.include ../common.test - -: line -: -$* <>EOO -for i: 1 2 3 - print $i -EOI -1 -2 -3 -EOO - -: block -: -$* <>EOO -for i: 1 2 3 -{ - # This is a block if you haven't noticed. - j = $i - print $j -} -EOI -1 -2 -3 -EOO - -: empty -: -$* <>EOO -for i: 1 2 3 -{ - for j: + - - { - print $j$i - } -} -EOI -+1 --1 -+2 --2 -+3 --3 -EOO - -: diag-line -: -$* <>EOE != 0 -for i: true false -{ - assert $i -} -EOI -:3:3: error: assertion failed -EOE - -: var-attribute -: -$* <>EOO -for [uint64] i: 0 1 2 -{ - i += 1 - print $i -} -EOI -1 -2 -3 -EOO - -: val-attribute -: -$* <>EOO -for i: [uint64s] 0 1 2 -{ - i += 1 - print $i -} -EOI -1 -2 -3 -EOO - -: pairs -: -$* <>EOO -for i: a@1 b@2 c@3 - print $i -EOI -a@1 -b@2 -c@3 -EOO diff --git a/tests/loop/for.testscript b/tests/loop/for.testscript new file mode 100644 index 0000000..6aec1b2 --- /dev/null +++ b/tests/loop/for.testscript @@ -0,0 +1,112 @@ +# file : tests/loop/for.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test for-loop. + +.include ../common.testscript + +: line +: +$* <>EOO +for i: 1 2 3 + print $i +EOI +1 +2 +3 +EOO + +: block +: +$* <>EOO +for i: 1 2 3 +{ + # This is a block if you haven't noticed. + j = $i + print $j +} +EOI +1 +2 +3 +EOO + +: empty +: +$* <>EOO +for i: 1 2 3 +{ + for j: + - + { + print $j$i + } +} +EOI ++1 +-1 ++2 +-2 ++3 +-3 +EOO + +: diag-line +: +$* <>EOE != 0 +for i: true false +{ + assert $i +} +EOI +:3:3: error: assertion failed +EOE + +: var-attribute +: +$* <>EOO +for [uint64] i: 0 1 2 +{ + i += 1 + print $i +} +EOI +1 +2 +3 +EOO + +: val-attribute +: +$* <>EOO +for i: [uint64s] 0 1 2 +{ + i += 1 + print $i +} +EOI +1 +2 +3 +EOO + +: pairs +: +$* <>EOO +for i: a@1 b@2 c@3 + print $i +EOI +a@1 +b@2 +c@3 +EOO -- cgit v1.1