Given the list of tracks that @ErikSchierboom provided (thanks btw), we’ve got two groups that share the same test cases and a third group that has some overlap:
First group
In summary, these tracks test collections that contain integers, strings, or other collections.
- crystal
- csharp
- elixir
- fsharp
- javascript
-
java (deprecated)
-
kotlin (deprecated)
- objective-c
-
ruby (deprecated)
- scala
- swift
- typescript
List of test cases
Click to expand
description: "keep on empty list returns empty list"
input:
list: []
fun: fn(x) -> true
expected: []
description: "keeps everything"
input:
list: [1, 3, 5]
fun: fn(x) -> x % 2 == 1
expected: [1, 3, 5]
description: "keeps first and last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 1
expected: [1, 3]
description: "keeps neither first nor last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 0
expected: [2]
description: "keeps strings"
input:
list: ["apple", "zebra", "banana", "zombies", "cherimoya", "zelot"]
fun: fn(x) -> starts_with(x, "z")
expected: ["zebra", "zombies", "zelot"]
description: "keeps arrays"
input:
list: [[1, 2, 3], [5, 5, 5], [5, 1, 2], [2, 1, 2], [1, 5, 2], [2, 2, 1], [1, 2, 5]]
fun: fn(x) -> contains(x, 5)
expected: [[5, 5, 5], [5, 1, 2], [1, 5, 2], [1, 2, 5]]
description: "discard on empty list returns empty list"
input:
list: []
fun: fn(x) -> true
expected: []
description: "discards nothing"
input:
list: [1, 3, 5]
fun: fn(x) -> x % 2 == 0
expected: [1, 3, 5]
description: "discards first and last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 1
expected: [2]
description: "discards neither first nor last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 0
expected: [1, 3]
description: "discards strings"
input:
list: ["apple", "zebra", "banana", "zombies", "cherimoya", "zelot"]
fun: fn(x) -> starts_with(x, "z")
expected: ["apple", "banana", "cherimoya"]
description: "discards arrays"
input:
list: [[1, 2, 3], [5, 5, 5], [5, 1, 2], [2, 1, 2], [1, 5, 2], [2, 2, 1], [1, 2, 5]]
fun: fn(x) -> contains(x, 5)
expected: [[1, 2, 3], [2, 1, 2], [2, 2, 1]]
Second group
In summary, these tracks test collections that contain integers or strings, but not other collections. They add one extra test for keep and discard that are not in the first group.
-
common-lisp (beta)
- elm
- erlang
- haskell
- lfe
- scheme
List of test cases
Click to expand
description: "keep on empty list returns empty list"
input:
list: []
fun: fn(x) -> true
expected: []
description: "keeps everything"
input:
list: [1, 3, 5]
fun: fn(x) -> x % 2 == 1
expected: [1, 3, 5]
description: "keeps nothing"
input:
list: [1, 3, 5]
fun: fn(x) -> x % 2 == 0
expected: []
description: "keeps first and last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 1
expected: [1, 3]
description: "keeps neither first nor last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 0
expected: [2]
description: "keeps strings"
input:
list: ["apple", "zebra", "banana", "zombies", "cherimoya", "zelot"]
fun: fn(x) -> starts_with(x, "z")
expected: ["zebra", "zombies", "zelot"]
description: "discard on empty list returns empty list"
input:
list: []
fun: fn(x) -> true
expected: []
description: "discards everything"
input:
list: [1, 3, 5]
fun: fn(x) -> x % 2 == 1
expected: []
description: "discards nothing"
input:
list: [1, 3, 5]
fun: fn(x) -> x % 2 == 0
expected: [1, 3, 5]
description: "discards first and last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 1
expected: [2]
description: "discards neither first nor last"
input:
list: [1, 2, 3]
fun: fn(x) -> x % 2 == 0
expected: [1, 3]
description: "discards strings"
input:
list: ["apple", "zebra", "banana", "zombies", "cherimoya", "zelot"]
fun: fn(x) -> starts_with(x, "z")
expected: ["apple", "banana", "cherimoya"]
Third group
These are tracks that don’t match any of the other two groups (although they still have some overlap).
- babashka
- clojure
- go
- groovy
- perl5
-
python (deprecated)
- tcl
With this in mind, what do you guys think is the best way forward?