Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions exercises/practice/flower-field/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ description = "cross"

[dd9d4ca8-9e68-4f78-a677-a2a70fd7a7b8]
description = "large garden"

[6e4ac13a-3e43-4728-a2e3-3551d4b1a996]
description = "multiple adjacent flowers"
8 changes: 8 additions & 0 deletions exercises/practice/flower-field/test/flower_field_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,12 @@ defmodule FlowerFieldTest do

assert FlowerField.annotate(input) == expected
end

@tag :pending
test "multiple adjacent flowers" do
input = [" ** "]
expected = ["1**1"]

assert FlowerField.annotate(input) == expected
end
end
6 changes: 6 additions & 0 deletions exercises/practice/isbn-verifier/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ description = "invalid character in isbn is not treated as zero"
[28025280-2c39-4092-9719-f3234b89c627]
description = "X is only valid as a check digit"

[8005b57f-f194-44ee-88d2-a77ac4142591]
description = "only one check digit is allowed"

[fdb14c99-4cf8-43c5-b06d-eb1638eff343]
description = "X is not substituted by the value 10"

[f6294e61-7e79-46b3-977b-f48789a4945b]
description = "valid isbn without separating dashes"

Expand Down
10 changes: 10 additions & 0 deletions exercises/practice/isbn-verifier/test/isbn_verifier_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ defmodule IsbnVerifierTest do
refute IsbnVerifier.isbn?("3-598-2X507-9")
end

@tag :pending
test "only one check digit is allowed" do
refute IsbnVerifier.isbn?("3-598-21508-96")
end

@tag :pending
test "X is not substituted by the value 10" do
refute IsbnVerifier.isbn?("3-598-2X507-5")
end

@tag :pending
test "valid isbn without separating dashes" do
assert IsbnVerifier.isbn?("3598215088")
Expand Down
21 changes: 18 additions & 3 deletions exercises/practice/satellite/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[8df3fa26-811a-4165-9286-ff9ac0850d19]
description = "Empty tree"
Expand All @@ -20,3 +27,11 @@ description = "Reject inconsistent traversals of same length"
[d86a3d72-76a9-43b5-9d3a-e64cb1216035]
description = "Reject traversals with repeated items"

[af31ae02-7e5b-4452-a990-bccb3fca9148]
description = "A degenerate binary tree"

[ee54463d-a719-4aae-ade4-190d30ce7320]
description = "Another degenerate binary tree"

[87123c08-c155-4486-90a4-e2f75b0f3e8f]
description = "Tree with many more items"
27 changes: 27 additions & 0 deletions exercises/practice/satellite/test/satellite_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,31 @@ defmodule SatelliteTest do
error = {:error, "traversals must contain unique items"}
assert Satellite.build_tree(preorder, inorder) == error
end

@tag :pending
test "A degenerate binary tree" do
preorder = [:a, :b, :c, :d]
inorder = [:d, :c, :b, :a]
tree = {{{{{}, :d, {}}, :c, {}}, :b, {}}, :a, {}}
assert Satellite.build_tree(preorder, inorder) == {:ok, tree}
end

@tag :pending
test "Another degenerate binary tree" do
preorder = [:a, :b, :c, :d]
inorder = [:a, :b, :c, :d]
tree = {{}, :a, {{}, :b, {{}, :c, {{}, :d, {}}}}}
assert Satellite.build_tree(preorder, inorder) == {:ok, tree}
end

@tag :pending
test "Tree with many more items" do
preorder = [:a, :b, :d, :g, :h, :c, :e, :f, :i]
inorder = [:g, :d, :h, :b, :a, :e, :c, :i, :f]

tree =
{{{{{}, :g, {}}, :d, {{}, :h, {}}}, :b, {}}, :a, {{{}, :e, {}}, :c, {{{}, :i, {}}, :f, {}}}}

assert Satellite.build_tree(preorder, inorder) == {:ok, tree}
end
end
Loading