aboutsummaryrefslogtreecommitdiff
path: root/tests/loop/for.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-09-03 16:37:32 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2018-09-04 16:29:59 +0300
commit5007870b52aa549971824959a55ad3bb886f09e0 (patch)
treeb0ef7f24c0b9ece2ed23f3c1792f16da324e4171 /tests/loop/for.test
parent09d60452a80d14d9b8bf3a9395860b50683fa1e8 (diff)
Rename .test/test{} to .testscript/testscript{}
Diffstat (limited to 'tests/loop/for.test')
-rw-r--r--tests/loop/for.test112
1 files changed, 0 insertions, 112 deletions
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
-:
-$* <<EOI >>EOO
-for i: 1 2 3
- print $i
-EOI
-1
-2
-3
-EOO
-
-: block
-:
-$* <<EOI >>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
-:
-$* <<EOI
-i = x
-nums =
-for i: $nums
- print $i
-assert ($i == x)
-EOI
-
-: nested
-:
-$* <<EOI >>EOO
-for i: 1 2 3
-{
- for j: + -
- {
- print $j$i
- }
-}
-EOI
-+1
--1
-+2
--2
-+3
--3
-EOO
-
-: diag-line
-:
-$* <<EOI 2>>EOE != 0
-for i: true false
-{
- assert $i
-}
-EOI
-<stdin>:3:3: error: assertion failed
-EOE
-
-: var-attribute
-:
-$* <<EOI >>EOO
-for [uint64] i: 0 1 2
-{
- i += 1
- print $i
-}
-EOI
-1
-2
-3
-EOO
-
-: val-attribute
-:
-$* <<EOI >>EOO
-for i: [uint64s] 0 1 2
-{
- i += 1
- print $i
-}
-EOI
-1
-2
-3
-EOO
-
-: pairs
-:
-$* <<EOI >>EOO
-for i: a@1 b@2 c@3
- print $i
-EOI
-a@1
-b@2
-c@3
-EOO