diff options
author | Li Jin <dragon-fly@qq.com> | 2022-09-30 11:29:41 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-09-30 11:29:41 +0800 |
commit | 5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2 (patch) | |
tree | 5c5c0ecdab0d19544652bc05b70d8131e1645337 /spec/inputs/test | |
parent | a6b6753fda9745f316f3236462b74794b35b85c9 (diff) | |
download | yuescript-5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2.tar.gz yuescript-5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2.tar.bz2 yuescript-5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2.zip |
fix issue #81, refactor continue with gotos.
Diffstat (limited to 'spec/inputs/test')
-rw-r--r-- | spec/inputs/test/loops_spec.yue | 6 |
1 files changed, 3 insertions, 3 deletions
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 | ||