diff options
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/goto.yue | 4 | ||||
| -rw-r--r-- | spec/inputs/loops.yue | 8 | ||||
| -rw-r--r-- | spec/inputs/test/loops_spec.yue | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/spec/inputs/goto.yue b/spec/inputs/goto.yue index 1197251..61584ca 100644 --- a/spec/inputs/goto.yue +++ b/spec/inputs/goto.yue | |||
| @@ -10,8 +10,8 @@ do | |||
| 10 | for z = 1, 10 do for y = 1, 10 do for x = 1, 10 | 10 | for z = 1, 10 do for y = 1, 10 do for x = 1, 10 |
| 11 | if x^2 + y^2 == z^2 | 11 | if x^2 + y^2 == z^2 |
| 12 | print 'found a Pythagorean triple:', x, y, z | 12 | print 'found a Pythagorean triple:', x, y, z |
| 13 | goto done | 13 | goto ok |
| 14 | ::done:: | 14 | ::ok:: |
| 15 | 15 | ||
| 16 | do | 16 | do |
| 17 | for z = 1, 10 | 17 | for z = 1, 10 |
diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index d03e661..d997c65 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue | |||
| @@ -111,10 +111,10 @@ until a == 10 | |||
| 111 | 111 | ||
| 112 | x = 0 | 112 | x = 0 |
| 113 | repeat | 113 | repeat |
| 114 | x += 1 | 114 | x += 1 |
| 115 | y = x | 115 | y = x |
| 116 | continue if x < 5 | 116 | continue if x < 5 |
| 117 | print y | 117 | print y |
| 118 | until y == 10 | 118 | until y == 10 |
| 119 | 119 | ||
| 120 | a = 3 | 120 | a = 3 |
diff --git a/spec/inputs/test/loops_spec.yue b/spec/inputs/test/loops_spec.yue index 817919f..a115581 100644 --- a/spec/inputs/test/loops_spec.yue +++ b/spec/inputs/test/loops_spec.yue | |||
| @@ -5,8 +5,8 @@ describe "loops", -> | |||
| 5 | continue if x % 2 == 1 | 5 | continue if x % 2 == 1 |
| 6 | x | 6 | x |
| 7 | 7 | ||
| 8 | assert.same output, { 2,4,6 } | 8 | assert.same { 2,4,6 }, output |
| 9 | 9 | ||
| 10 | it "continue in repeat", -> | 10 | it "continue in repeat", -> |
| 11 | output = {} | 11 | output = {} |
| 12 | a = 0 | 12 | a = 0 |
| @@ -19,5 +19,5 @@ describe "loops", -> | |||
| 19 | output[] = a | 19 | output[] = a |
| 20 | until a == 8 | 20 | until a == 8 |
| 21 | 21 | ||
| 22 | assert.same output, { 1,2,4 } | 22 | assert.same { 1,2,4 }, output |
| 23 | 23 | ||
