Skip to content
Draft
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/bob/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ description = "shouting with special characters"
[e6793c1c-43bd-4b8d-bc11-499aea73925f]
description = "shouting with no exclamation mark"

[3c954328-86fb-4c71-8961-e18d6a5e2517]
description = "shouting a statement containing a question mark"

[aa8097cc-c548-4951-8856-14a404dd236a]
description = "statement containing question mark"

Expand Down
5 changes: 5 additions & 0 deletions exercises/practice/bob/bob_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ TEST_CASE("shouting_with_no_exclamation_mark",
REQUIRE("Whoa, chill out!" == bob::hey("I HATE THE DMV"));
}

TEST_CASE("shouting_a_statement_containing_a_question_mark",
"[3c954328-86fb-4c71-8961-e18d6a5e2517]") {
REQUIRE("Whoa, chill out!" == bob::hey("DO LIONS EAT PEOPLE? AHHHHH."));
}

TEST_CASE("statement_containing_question_mark",
"[aa8097cc-c548-4951-8856-14a404dd236a]") {
REQUIRE("Whatever." == bob::hey("Ending with ? means a question."));
Expand Down
3 changes: 3 additions & 0 deletions exercises/practice/perfect-numbers/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ description = "Abundant numbers -> Medium abundant number is classified correctl
[ec7792e6-8786-449c-b005-ce6dd89a772b]
description = "Abundant numbers -> Large abundant number is classified correctly"

[05f15b93-849c-45e9-9c7d-1ea131ef7d10]
description = "Abundant numbers -> Perfect square abundant number is classified correctly"

[e610fdc7-2b6e-43c3-a51c-b70fb37413ba]
description = "Deficient numbers -> Smallest prime deficient number is classified correctly"

Expand Down
6 changes: 6 additions & 0 deletions exercises/practice/perfect-numbers/perfect_numbers_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ TEST_CASE("Large abundant number is classified correctly",
perfect_numbers::classify(33550335));
}

TEST_CASE("Perfect square abundant number is classified correctly",
"[05f15b93-849c-45e9-9c7d-1ea131ef7d10]") {
REQUIRE(perfect_numbers::classification::abundant ==
perfect_numbers::classify(196));
}

TEST_CASE("Smallest prime deficient number is classified correctly",
"[e610fdc7-2b6e-43c3-a51c-b70fb37413ba]") {
REQUIRE(perfect_numbers::classification::deficient ==
Expand Down
Loading