Skip to content

Commit d5588f3

Browse files
authored
Sync list-ops tests (#600)
1 parent aa88dba commit d5588f3

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

exercises/practice/list-ops/.meta/tests.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ description = "append entries to a list and return the new list -> empty lists"
1515
[2c894696-b609-4569-b149-8672134d340a]
1616
description = "append entries to a list and return the new list -> list to empty list"
1717

18+
[e842efed-3bf6-4295-b371-4d67a4fdf19c]
19+
description = "append entries to a list and return the new list -> empty list to list"
20+
1821
[71dcf5eb-73ae-4a0e-b744-a52ee387922f]
1922
description = "append entries to a list and return the new list -> non-empty lists"
2023

exercises/practice/list-ops/list-ops_spec.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ describe('list-ops', function()
1414
assert.are.same(expected, actual)
1515
end)
1616

17+
it('empty list to list', function()
18+
local expected = { 1, 2, 3, 4 }
19+
local actual = list_ops.append({ 1, 2, 3, 4 }, {})
20+
assert.are.same(expected, actual)
21+
end)
22+
1723
it('non-empty lists', function()
1824
local expected = { 1, 2, 2, 3, 4, 5 }
1925
local actual = list_ops.append({ 1, 2 }, { 2, 3, 4, 5 })

0 commit comments

Comments
 (0)