Skip to content

Commit db8205d

Browse files
committed
fix: have test name on one line again
1 parent 27f008a commit db8205d

File tree

9 files changed

+29
-87
lines changed

9 files changed

+29
-87
lines changed

exercises/concept/lasagna-master/lasagna_master_test.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ using namespace lasagna_master;
1717
REQUIRE(std::abs(vec1.at(i) - vec2.at(i)) < margin); \
1818
}
1919

20-
TEST_CASE(
21-
"preparationTime: Preparation time for many layers with custom average "
22-
"time",
20+
TEST_CASE("preparationTime: Preparation time for many layers with custom average time",
2321
"[task_1]") {
2422
std::vector<std::string> layers{
2523
"sauce", "noodles", "béchamel", "meat",

exercises/concept/pacman-rules/pacman_rules_test.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ TEST_CASE("ghost does not get eaten because not touching ghost", "[task_1]") {
2020
REQUIRE_FALSE(can_eat_ghost(true, false));
2121
}
2222

23-
TEST_CASE(
24-
"ghost does not get eaten because no power pellet is active, even if not "
25-
"touching ghost",
23+
TEST_CASE("ghost does not get eaten because no power pellet is active, even if not touching ghost",
2624
"[task_1]") {
2725
REQUIRE_FALSE(can_eat_ghost(false, false));
2826
}

exercises/practice/allergies/allergies_test.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,12 @@ TEST_CASE("testing for strawberries allergy -> allergic only to strawberries",
9696
REQUIRE(true == allergies::allergy_test(8).is_allergic_to("strawberries"));
9797
}
9898

99-
TEST_CASE(
100-
"testing for strawberries allergy -> allergic to strawberries and "
101-
"something else",
99+
TEST_CASE("testing for strawberries allergy -> allergic to strawberries and something else",
102100
"[50f5f8f3-3bac-47e6-8dba-2d94470a4bc6]") {
103101
REQUIRE(true == allergies::allergy_test(28).is_allergic_to("strawberries"));
104102
}
105103

106-
TEST_CASE(
107-
"testing for strawberries allergy -> allergic to something, but not "
108-
"strawberries",
104+
TEST_CASE("testing for strawberries allergy -> allergic to something, but not strawberries",
109105
"[23dd6952-88c9-48d7-a7d5-5d0343deb18d]") {
110106
REQUIRE(false ==
111107
allergies::allergy_test(20).is_allergic_to("strawberries"));

exercises/practice/complex-numbers/complex_numbers_test.cpp

+14-42
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ TEST_CASE("Arithmetic -> Subtraction -> Subtract purely imaginary numbers",
121121
require_approx_equal(Complex(0.0, -1.0), c1 - c2);
122122
}
123123

124-
TEST_CASE(
125-
"Arithmetic -> Subtraction -> Subtract numbers with real and imaginary "
126-
"part",
124+
TEST_CASE("Arithmetic -> Subtraction -> Subtract numbers with real and imaginary part",
127125
"[f876feb1-f9d1-4d34-b067-b599a8746400]") {
128126
const Complex c1{1.0, 2.0};
129127
const Complex c2{3.0, 4.0};
@@ -147,9 +145,7 @@ TEST_CASE("Arithmetic -> Multiplication -> Multiply purely imaginary numbers",
147145
require_approx_equal(Complex(-2.0, 0.0), c1 * c2);
148146
}
149147

150-
TEST_CASE(
151-
"Arithmetic -> Multiplication -> Multiply numbers with real and imaginary "
152-
"part",
148+
TEST_CASE("Arithmetic -> Multiplication -> Multiply numbers with real and imaginary part",
153149
"[4d1d10f0-f8d4-48a0-b1d0-f284ada567e6]") {
154150
const Complex c1{1.0, 2.0};
155151
const Complex c2{3.0, 4.0};
@@ -196,18 +192,14 @@ TEST_CASE("Absolute value -> Absolute value of a negative purely real number",
196192
REQUIRE_THAT(c.abs(), Catch::Matchers::WithinAbs(5.0, eps));
197193
}
198194

199-
TEST_CASE(
200-
"Absolute value -> Absolute value of a purely imaginary number with "
201-
"positive imaginary part",
195+
TEST_CASE("Absolute value -> Absolute value of a purely imaginary number with positive imaginary part",
202196
"[bbe26568-86c1-4bb4-ba7a-da5697e2b994]") {
203197
const Complex c{0.0, 5.0};
204198

205199
REQUIRE_THAT(c.abs(), Catch::Matchers::WithinAbs(5.0, eps));
206200
}
207201

208-
TEST_CASE(
209-
"Absolute value -> Absolute value of a purely imaginary number with "
210-
"negative imaginary part",
202+
TEST_CASE("Absolute value -> Absolute value of a purely imaginary number with negative imaginary part",
211203
"[3b48233d-468e-4276-9f59-70f4ca1f26f3]") {
212204
const Complex c{0.0, -5.0};
213205

@@ -266,90 +258,70 @@ TEST_CASE("Complex exponential function -> Exponential of a purely real number",
266258
}
267259

268260
// Extra Credit
269-
TEST_CASE(
270-
"Complex exponential function -> Exponential of a number with real and "
271-
"imaginary part",
261+
TEST_CASE("Complex exponential function -> Exponential of a number with real and imaginary part",
272262
"[08eedacc-5a95-44fc-8789-1547b27a8702]") {
273263
const Complex c{std::log(2.0), M_PI};
274264

275265
require_approx_equal(Complex(-2.0, 0.0), c.exp());
276266
}
277267

278-
TEST_CASE(
279-
"Complex exponential function -> Exponential resulting in a number with "
280-
"real and imaginary part",
268+
TEST_CASE("Complex exponential function -> Exponential resulting in a number with real and imaginary part",
281269
"[d2de4375-7537-479a-aa0e-d474f4f09859]") {
282270
const Complex c{std::log(2.0) / 2.0, M_PI / 4.0};
283271

284272
require_approx_equal(Complex(1.0, 1.0), c.exp());
285273
}
286274

287-
TEST_CASE(
288-
"Operations between real numbers and complex numbers -> Add real number to "
289-
"complex number",
275+
TEST_CASE("Operations between real numbers and complex numbers -> Add real number to complex number",
290276
"[06d793bf-73bd-4b02-b015-3030b2c952ec]") {
291277
const Complex c{1.0, 2.0};
292278

293279
require_approx_equal(Complex(6.0, 2.0), c + 5.0);
294280
}
295281

296-
TEST_CASE(
297-
"Operations between real numbers and complex numbers -> Add complex number "
298-
"to real number",
282+
TEST_CASE("Operations between real numbers and complex numbers -> Add complex number to real number",
299283
"[d77dbbdf-b8df-43f6-a58d-3acb96765328]") {
300284
const Complex c{1.0, 2.0};
301285

302286
require_approx_equal(Complex(6.0, 2.0), 5.0 + c);
303287
}
304288

305-
TEST_CASE(
306-
"Operations between real numbers and complex numbers -> Subtract real "
307-
"number from complex number",
289+
TEST_CASE("Operations between real numbers and complex numbers -> Subtract real number from complex number",
308290
"[20432c8e-8960-4c40-ba83-c9d910ff0a0f]") {
309291
const Complex c{5.0, 7.0};
310292

311293
require_approx_equal(Complex(1.0, 7.0), c - 4.0);
312294
}
313295

314-
TEST_CASE(
315-
"Operations between real numbers and complex numbers -> Subtract complex "
316-
"number from real number",
296+
TEST_CASE("Operations between real numbers and complex numbers -> Subtract complex number from real number",
317297
"[b4b38c85-e1bf-437d-b04d-49bba6e55000]") {
318298
const Complex c{5.0, 7.0};
319299

320300
require_approx_equal(Complex(-1.0, -7.0), 4.0 - c);
321301
}
322302

323-
TEST_CASE(
324-
"Operations between real numbers and complex numbers -> Multiply complex "
325-
"number by real number",
303+
TEST_CASE("Operations between real numbers and complex numbers -> Multiply complex number by real number",
326304
"[dabe1c8c-b8f4-44dd-879d-37d77c4d06bd]") {
327305
const Complex c{2.0, 5.0};
328306

329307
require_approx_equal(Complex(10.0, 25.0), c * 5.0);
330308
}
331309

332-
TEST_CASE(
333-
"Operations between real numbers and complex numbers -> Multiply real "
334-
"number by complex number",
310+
TEST_CASE("Operations between real numbers and complex numbers -> Multiply real number by complex number",
335311
"[6c81b8c8-9851-46f0-9de5-d96d314c3a28]") {
336312
const Complex c{2.0, 5.0};
337313

338314
require_approx_equal(Complex(10.0, 25.0), 5.0 * c);
339315
}
340316

341-
TEST_CASE(
342-
"Operations between real numbers and complex numbers -> Divide complex "
343-
"number by real number",
317+
TEST_CASE("Operations between real numbers and complex numbers -> Divide complex number by real number",
344318
"[8a400f75-710e-4d0c-bcb4-5e5a00c78aa0]") {
345319
const Complex c{10.0, 100.0};
346320

347321
require_approx_equal(Complex(1.0, 10.0), c / 10.0);
348322
}
349323

350-
TEST_CASE(
351-
"Operations between real numbers and complex numbers -> Divide real number "
352-
"by complex number",
324+
TEST_CASE("Operations between real numbers and complex numbers -> Divide real number by complex number",
353325
"[9a867d1b-d736-4c41-a41e-90bd148e9d5e]") {
354326
const Complex c{1.0, 1.0};
355327

exercises/practice/linked-list/linked_list_test.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ TEST_CASE("erases the element with the specified value from the list",
137137
REQUIRE(71 == llist.shift());
138138
}
139139

140-
TEST_CASE(
141-
"erases the element with the specified value from the list, re-assigns "
142-
"tail",
140+
TEST_CASE("erases the element with the specified value from the list, re-assigns tail",
143141
"[59db191a-b17f-4ab7-9c5c-60711ec1d013]") {
144142
linked_list::List<int> llist{};
145143
llist.push(71);
@@ -151,9 +149,7 @@ TEST_CASE(
151149
REQUIRE(71 == llist.pop());
152150
}
153151

154-
TEST_CASE(
155-
"erases the element with the specified value from the list, re-assigns "
156-
"head",
152+
TEST_CASE("erases the element with the specified value from the list, re-assigns head",
157153
"[58242222-5d39-415b-951d-8128247f8993]") {
158154
linked_list::List<int> llist{};
159155
llist.push(71);

exercises/practice/luhn/luhn_test.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ TEST_CASE("using ascii value for doubled non-digit isn't allowed",
109109
REQUIRE(false == luhn::valid(":9"));
110110
}
111111

112-
TEST_CASE(
113-
"non-numeric, non-space char in the middle with a sum that's divisible by "
114-
"10 isn't allowed",
112+
TEST_CASE("non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed",
115113
"[8b72ad26-c8be-49a2-b99c-bcc3bf631b33]") {
116114
REQUIRE(false == luhn::valid("59%59"));
117115
}

exercises/practice/queen-attack/queen_attack_test.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ TEST_CASE("queens_can_attack_on_fourth_diagonal") {
103103
REQUIRE(board.can_attack());
104104
}
105105

106-
TEST_CASE(
107-
"queens_cannot_attack_if_falling_diagonals_are_only_the_same_when_"
108-
"reflected_across_the_longest_falling_diagonal") {
106+
TEST_CASE("queens_cannot_attack_if_falling_diagonals_are_only_the_same_when_reflected_across_the_longest_falling_diagonal") {
109107
const queen_attack::chess_board board{std::make_pair(4, 1),
110108
std::make_pair(2, 5)};
111109

exercises/practice/raindrops/raindrops_test.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ TEST_CASE("the_sound_for_7_is_plong") {
1919
TEST_CASE("the_sound_for_6_is_pling_as_it_has_a_factor_3") {
2020
REQUIRE("Pling" == raindrops::convert(6));
2121
}
22-
TEST_CASE(
23-
"2_to_the_power_3_does_not_make_a_raindrop_sound_as_3_is_the_exponent_not_"
24-
"the_base") {
22+
TEST_CASE("2_to_the_power_3_does_not_make_a_raindrop_sound_as_3_is_the_exponent_not_the_base") {
2523
REQUIRE("8" == raindrops::convert(8));
2624
}
2725
TEST_CASE("the_sound_for_9_is_pling_as_it_has_a_factor_3") {

exercises/practice/two-bucket/two_bucket_test.cpp

+6-18
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
CATCH_REGISTER_ENUM(two_bucket::bucket_id, two_bucket::bucket_id::one,
99
two_bucket::bucket_id::two)
1010

11-
TEST_CASE(
12-
"Measure using bucket one of size 3 and bucket two of size 5 - start with "
13-
"bucket one",
11+
TEST_CASE("Measure using bucket one of size 3 and bucket two of size 5 - start with bucket one",
1412
"[a6f2b4ba-065f-4dca-b6f0-e3eee51cb661]") {
1513
auto bucket1_capacity = 3;
1614
auto bucket2_capacity = 5;
@@ -27,9 +25,7 @@ TEST_CASE(
2725

2826
#if defined(EXERCISM_RUN_ALL_TESTS)
2927

30-
TEST_CASE(
31-
"Measure using bucket one of size 3 and bucket two of size 5 - start with "
32-
"bucket two",
28+
TEST_CASE("Measure using bucket one of size 3 and bucket two of size 5 - start with bucket two",
3329
"[6c4ea451-9678-4926-b9b3-68364e066d40]") {
3430
auto bucket1_capacity = 3;
3531
auto bucket2_capacity = 5;
@@ -44,9 +40,7 @@ TEST_CASE(
4440
CHECK(actual.other_bucket_volume == 3);
4541
}
4642

47-
TEST_CASE(
48-
"Measure using bucket one of size 7 and bucket two of size 11 - start with "
49-
"bucket one",
43+
TEST_CASE("Measure using bucket one of size 7 and bucket two of size 11 - start with bucket one",
5044
"[3389f45e-6a56-46d5-9607-75aa930502ff]") {
5145
auto bucket1_capacity = 7;
5246
auto bucket2_capacity = 11;
@@ -61,9 +55,7 @@ TEST_CASE(
6155
CHECK(actual.other_bucket_volume == 11);
6256
}
6357

64-
TEST_CASE(
65-
"Measure using bucket one of size 7 and bucket two of size 11 - start with "
66-
"bucket two",
58+
TEST_CASE("Measure using bucket one of size 7 and bucket two of size 11 - start with bucket two",
6759
"[fe0ff9a0-3ea5-4bf7-b17d-6d4243961aa1]") {
6860
auto bucket1_capacity = 7;
6961
auto bucket2_capacity = 11;
@@ -78,9 +70,7 @@ TEST_CASE(
7870
CHECK(actual.other_bucket_volume == 7);
7971
}
8072

81-
TEST_CASE(
82-
"Measure one step using bucket one of size 1 and bucket two of size 3 - "
83-
"start with bucket two",
73+
TEST_CASE("Measure one step using bucket one of size 1 and bucket two of size 3 - start with bucket two",
8474
"[0ee1f57e-da84-44f7-ac91-38b878691602]") {
8575
auto bucket1_capacity = 1;
8676
auto bucket2_capacity = 3;
@@ -95,9 +85,7 @@ TEST_CASE(
9585
CHECK(actual.other_bucket_volume == 0);
9686
}
9787

98-
TEST_CASE(
99-
"Measure using bucket one of size 2 and bucket two of size 3 - start with "
100-
"bucket one and end with bucket two",
88+
TEST_CASE("Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two",
10189
"[eb329c63-5540-4735-b30b-97f7f4df0f84]") {
10290
auto bucket1_capacity = 2;
10391
auto bucket2_capacity = 3;

0 commit comments

Comments
 (0)