Skip to content

Commit 6d043d9

Browse files
authored
tests: update uuids and toml file for high-scores (#911)
[no important files changed]
1 parent 6e438f9 commit 6d043d9

File tree

2 files changed

+72
-12
lines changed

2 files changed

+72
-12
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
11+
12+
[1035eb93-2208-4c22-bab8-fef06769a73c]
13+
description = "List of scores"
14+
15+
[6aa5dbf5-78fa-4375-b22c-ffaa989732d2]
16+
description = "Latest score"
17+
18+
[b661a2e1-aebf-4f50-9139-0fb817dd12c6]
19+
description = "Personal best"
20+
21+
[3d996a97-c81c-4642-9afc-80b80dc14015]
22+
description = "Top 3 scores -> Personal top three from a list of scores"
23+
24+
[1084ecb5-3eb4-46fe-a816-e40331a4e83a]
25+
description = "Top 3 scores -> Personal top highest to lowest"
26+
27+
[e6465b6b-5a11-4936-bfe3-35241c4f4f16]
28+
description = "Top 3 scores -> Personal top when there is a tie"
29+
30+
[f73b02af-c8fd-41c9-91b9-c86eaa86bce2]
31+
description = "Top 3 scores -> Personal top when there are less than 3"
32+
33+
[16608eae-f60f-4a88-800e-aabce5df2865]
34+
description = "Top 3 scores -> Personal top when there is only one"
35+
36+
[2df075f9-fec9-4756-8f40-98c52a11504f]
37+
description = "Top 3 scores -> Latest score after personal top scores"
38+
39+
[809c4058-7eb1-4206-b01e-79238b9b71bc]
40+
description = "Top 3 scores -> Scores after personal top scores"
41+
42+
[ddb0efc0-9a86-4f82-bc30-21ae0bdc6418]
43+
description = "Top 3 scores -> Latest score after personal best"
44+
45+
[6a0fd2d1-4cc4-46b9-a5bb-2fb667ca2364]
46+
description = "Top 3 scores -> Scores after personal best"

exercises/practice/high-scores/high_scores_test.cpp

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,72 @@
99
#endif
1010

1111
// Declares a single test.
12-
TEST_CASE("List of scores", "[scores]") {
12+
TEST_CASE("List of scores", "[1035eb93-2208-4c22-bab8-fef06769a73c][scores]") {
1313
std::vector<int> scores{30, 50, 20, 70};
1414
arcade::HighScores hs{scores};
1515
REQUIRE(hs.list_scores() == scores);
1616
}
1717

1818
#ifdef EXERCISM_RUN_ALL_TESTS
1919

20-
TEST_CASE("Latest score", "[latest]") {
20+
TEST_CASE("Latest score", "[6aa5dbf5-78fa-4375-b22c-ffaa989732d2][latest]") {
2121
std::vector<int> scores{100, 0, 90, 30};
2222
int expected{30};
2323
arcade::HighScores hs{scores};
2424
REQUIRE(hs.latest_score() == expected);
2525
}
2626

27-
TEST_CASE("Personal best", "[personalBest]") {
27+
TEST_CASE("Personal best",
28+
"[b661a2e1-aebf-4f50-9139-0fb817dd12c6][personalBest]") {
2829
std::vector<int> scores{40, 100, 70};
2930
int expected{100};
3031
arcade::HighScores hs{scores};
3132
REQUIRE(hs.personal_best() == expected);
3233
}
3334

34-
TEST_CASE("Personal top three from a list of scores", "[personalTopThree]") {
35+
TEST_CASE("Personal top three from a list of scores",
36+
"[3d996a97-c81c-4642-9afc-80b80dc14015][personalTopThree]") {
3537
std::vector<int> scores{10, 30, 90, 30, 100, 20, 10, 0, 30, 40, 40, 70, 70};
3638
std::vector<int> expected{100, 90, 70};
3739
arcade::HighScores hs{scores};
3840
REQUIRE(hs.top_three() == expected);
3941
}
4042

41-
TEST_CASE("Personal top highest to lowest", "[personalTopThree]") {
43+
TEST_CASE("Personal top highest to lowest",
44+
"[1084ecb5-3eb4-46fe-a816-e40331a4e83a][personalTopThree]") {
4245
std::vector<int> scores{20, 10, 30};
4346
std::vector<int> expected{30, 20, 10};
4447
arcade::HighScores hs{scores};
4548
REQUIRE(hs.top_three() == expected);
4649
}
4750

48-
TEST_CASE("Personal top when there is a tie", "[personalTopThree]") {
51+
TEST_CASE("Personal top when there is a tie",
52+
"[e6465b6b-5a11-4936-bfe3-35241c4f4f16][personalTopThree]") {
4953
std::vector<int> scores{40, 20, 40, 30};
5054
std::vector<int> expected{40, 40, 30};
5155
arcade::HighScores hs{scores};
5256
REQUIRE(hs.top_three() == expected);
5357
}
5458

55-
TEST_CASE("Personal top when there are less than 3", "[personalTopThree]") {
59+
TEST_CASE("Personal top when there are less than 3",
60+
"[f73b02af-c8fd-41c9-91b9-c86eaa86bce2][personalTopThree]") {
5661
std::vector<int> scores{30, 70};
5762
std::vector<int> expected{70, 30};
5863
arcade::HighScores hs{scores};
5964
REQUIRE(hs.top_three() == expected);
6065
}
6166

62-
TEST_CASE("Personal top when there is only one", "[personalTopThree]") {
67+
TEST_CASE("Personal top when there is only one",
68+
"[16608eae-f60f-4a88-800e-aabce5df2865][personalTopThree]") {
6369
std::vector<int> scores{40};
6470
std::vector<int> expected{40};
6571
arcade::HighScores hs{scores};
6672
REQUIRE(hs.top_three() == expected);
6773
}
6874

69-
TEST_CASE("Latest score after personal top scores", "[immutable, latestAfterTopThree]") {
75+
TEST_CASE(
76+
"Latest score after personal top scores",
77+
"[2df075f9-fec9-4756-8f40-98c52a11504f][immutable, latestAfterTopThree]") {
7078
// Test if latest_score is still valid after calling top_three
7179
std::vector<int> scores{70, 50, 20, 30};
7280
int expected{30};
@@ -75,15 +83,19 @@ TEST_CASE("Latest score after personal top scores", "[immutable, latestAfterTopT
7583
REQUIRE(hs.latest_score() == expected);
7684
}
7785

78-
TEST_CASE("Scores after personal top scores", "[immutable, scoresAfterTopThree]") {
86+
TEST_CASE(
87+
"Scores after personal top scores",
88+
"[809c4058-7eb1-4206-b01e-79238b9b71bc][immutable, scoresAfterTopThree]") {
7989
// Test if list_scores is unchanged after calling top_three
8090
std::vector<int> scores{30, 50, 20, 70};
8191
arcade::HighScores hs{scores};
8292
hs.top_three();
8393
REQUIRE(hs.list_scores() == scores);
8494
}
8595

86-
TEST_CASE("Latest score after personal best", "[immutable, latestAfterBest]") {
96+
TEST_CASE(
97+
"Latest score after personal best",
98+
"[ddb0efc0-9a86-4f82-bc30-21ae0bdc6418][immutable, latestAfterBest]") {
8799
// Test if latest_score is still valid after calling personal_best
88100
std::vector<int> scores{20, 70, 15, 25, 30};
89101
int expected{30};
@@ -92,7 +104,9 @@ TEST_CASE("Latest score after personal best", "[immutable, latestAfterBest]") {
92104
REQUIRE(hs.latest_score() == expected);
93105
}
94106

95-
TEST_CASE("Scores after personal best", "[immutable, scoresAfterBest]") {
107+
TEST_CASE(
108+
"Scores after personal best",
109+
"[6a0fd2d1-4cc4-46b9-a5bb-2fb667ca2364][immutable, scoresAfterBest]") {
96110
// Test if list_scores is unchanged after calling personal_best
97111
std::vector<int> scores{20, 70, 15, 25, 30};
98112
arcade::HighScores hs{scores};

0 commit comments

Comments
 (0)