Skip to content

Commit 30c8908

Browse files
Sync wordy (#546)
1 parent 7f22595 commit 30c8908

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

exercises/practice/wordy/.meta/tests.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,21 @@
1212
[88bf4b28-0de3-4883-93c7-db1b14aa806e]
1313
description = "just a number"
1414

15+
[18983214-1dfc-4ebd-ac77-c110dde699ce]
16+
description = "just a zero"
17+
18+
[607c08ee-2241-4288-916d-dae5455c87e6]
19+
description = "just a negative number"
20+
1521
[bb8c655c-cf42-4dfc-90e0-152fcfd8d4e0]
1622
description = "addition"
1723

24+
[bb9f2082-171c-46ad-ad4e-c3f72087c1b5]
25+
description = "addition with a left hand zero"
26+
27+
[6fa05f17-405a-4742-80ae-5d1a8edb0d5d]
28+
description = "addition with a right hand zero"
29+
1830
[79e49e06-c5ae-40aa-a352-7a3a01f70015]
1931
description = "more addition"
2032

exercises/practice/wordy/wordy_spec.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,26 @@ describe('wordy', function()
55
assert.are.same(5, wordy.answer('What is 5?'))
66
end)
77

8+
it('just a zero', function()
9+
assert.are.same(0, wordy.answer('What is 0?'))
10+
end)
11+
12+
it('just a negative number', function()
13+
assert.are.same(-123, wordy.answer('What is -123?'))
14+
end)
15+
816
it('addition', function()
917
assert.are.same(2, wordy.answer('What is 1 plus 1?'))
1018
end)
1119

20+
it('addition with a left hand zero', function()
21+
assert.are.same(2, wordy.answer('What is 0 plus 2?'))
22+
end)
23+
24+
it('addition with a right hand zero', function()
25+
assert.are.same(3, wordy.answer('What is 3 plus 0?'))
26+
end)
27+
1228
it('more addition', function()
1329
assert.are.same(55, wordy.answer('What is 53 plus 2?'))
1430
end)

0 commit comments

Comments
 (0)