diff --git a/exercises/practice/list-ops/.meta/tests.toml b/exercises/practice/list-ops/.meta/tests.toml index 08b1edc..893becc 100644 --- a/exercises/practice/list-ops/.meta/tests.toml +++ b/exercises/practice/list-ops/.meta/tests.toml @@ -100,7 +100,10 @@ reimplements = "be396a53-c074-4db3-8dd6-f7ed003cce7c" description = "reverse the elements of the list -> empty list" [fcc03d1e-42e0-4712-b689-d54ad761f360] -description = "reverse the elements of the list -> non-empty list" +description = "reverse the elements of the list -> non-empty even-length list" + +[64d77184-5f74-4845-b158-545d2dd2df98] +description = "reverse the elements of the list -> non-empty odd-length list" [40872990-b5b8-4cb8-9085-d91fc0d05d26] description = "reverse the elements of the list -> list of lists is not flattened" diff --git a/exercises/practice/list-ops/list_ops_spec.moon b/exercises/practice/list-ops/list_ops_spec.moon index 6213faa..8dd1077 100644 --- a/exercises/practice/list-ops/list_ops_spec.moon +++ b/exercises/practice/list-ops/list_ops_spec.moon @@ -109,11 +109,16 @@ describe 'list-ops:', -> expected = {} assert.are.same expected, result - pending 'non-empty list', -> + pending 'non-empty even-length list', -> result = ListOps.reverse {1, 3, 5, 7} expected = {7, 5, 3, 1} assert.are.same expected, result + pending 'non-empty odd-length list', -> + result = ListOps.reverse {1, 3, 5, 7, 9, 11, 13} + expected = {13, 11, 9, 7, 5, 3, 1} + assert.are.same expected, result + pending 'list of lists is not flattened', -> result = ListOps.reverse {{1, 2}, {3}, {}, {4, 5, 6}} expected = {{4, 5, 6}, {}, {3}, {1, 2}}