Skip to content

Commit deece71

Browse files
authored
fix: have test name on one line again (#946)
1 parent 27f008a commit deece71

File tree

9 files changed

+89
-58
lines changed

9 files changed

+89
-58
lines changed

exercises/concept/lasagna-master/lasagna_master_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ using namespace lasagna_master;
1818
}
1919

2020
TEST_CASE(
21-
"preparationTime: Preparation time for many layers with custom average "
22-
"time",
21+
// clang-format off
22+
"preparationTime: Preparation time for many layers with custom average time",
23+
// clang-format on
2324
"[task_1]") {
2425
std::vector<std::string> layers{
2526
"sauce", "noodles", "béchamel", "meat",

exercises/concept/pacman-rules/pacman_rules_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ TEST_CASE("ghost does not get eaten because not touching ghost", "[task_1]") {
2121
}
2222

2323
TEST_CASE(
24-
"ghost does not get eaten because no power pellet is active, even if not "
25-
"touching ghost",
24+
// clang-format off
25+
"ghost does not get eaten because no power pellet is active, even if not touching ghost",
26+
// clang-format on
2627
"[task_1]") {
2728
REQUIRE_FALSE(can_eat_ghost(false, false));
2829
}

exercises/practice/allergies/allergies_test.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,17 @@ TEST_CASE("testing for strawberries allergy -> allergic only to strawberries",
9797
}
9898

9999
TEST_CASE(
100-
"testing for strawberries allergy -> allergic to strawberries and "
101-
"something else",
100+
// clang-format off
101+
"testing for strawberries allergy -> allergic to strawberries and something else",
102+
// clang-format on
102103
"[50f5f8f3-3bac-47e6-8dba-2d94470a4bc6]") {
103104
REQUIRE(true == allergies::allergy_test(28).is_allergic_to("strawberries"));
104105
}
105106

106107
TEST_CASE(
107-
"testing for strawberries allergy -> allergic to something, but not "
108-
"strawberries",
108+
// clang-format off
109+
"testing for strawberries allergy -> allergic to something, but not strawberries",
110+
// clang-format on
109111
"[23dd6952-88c9-48d7-a7d5-5d0343deb18d]") {
110112
REQUIRE(false ==
111113
allergies::allergy_test(20).is_allergic_to("strawberries"));

exercises/practice/complex-numbers/complex_numbers_test.cpp

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ TEST_CASE("Arithmetic -> Subtraction -> Subtract purely imaginary numbers",
122122
}
123123

124124
TEST_CASE(
125-
"Arithmetic -> Subtraction -> Subtract numbers with real and imaginary "
126-
"part",
125+
// clang-format off
126+
"Arithmetic -> Subtraction -> Subtract numbers with real and imaginary part",
127+
// clang-format on
127128
"[f876feb1-f9d1-4d34-b067-b599a8746400]") {
128129
const Complex c1{1.0, 2.0};
129130
const Complex c2{3.0, 4.0};
@@ -148,8 +149,9 @@ TEST_CASE("Arithmetic -> Multiplication -> Multiply purely imaginary numbers",
148149
}
149150

150151
TEST_CASE(
151-
"Arithmetic -> Multiplication -> Multiply numbers with real and imaginary "
152-
"part",
152+
// clang-format off
153+
"Arithmetic -> Multiplication -> Multiply numbers with real and imaginary part",
154+
// clang-format on
153155
"[4d1d10f0-f8d4-48a0-b1d0-f284ada567e6]") {
154156
const Complex c1{1.0, 2.0};
155157
const Complex c2{3.0, 4.0};
@@ -197,17 +199,19 @@ TEST_CASE("Absolute value -> Absolute value of a negative purely real number",
197199
}
198200

199201
TEST_CASE(
200-
"Absolute value -> Absolute value of a purely imaginary number with "
201-
"positive imaginary part",
202+
// clang-format off
203+
"Absolute value -> Absolute value of a purely imaginary number with positive imaginary part",
204+
// clang-format on
202205
"[bbe26568-86c1-4bb4-ba7a-da5697e2b994]") {
203206
const Complex c{0.0, 5.0};
204207

205208
REQUIRE_THAT(c.abs(), Catch::Matchers::WithinAbs(5.0, eps));
206209
}
207210

208211
TEST_CASE(
209-
"Absolute value -> Absolute value of a purely imaginary number with "
210-
"negative imaginary part",
212+
// clang-format off
213+
"Absolute value -> Absolute value of a purely imaginary number with negative imaginary part",
214+
// clang-format on
211215
"[3b48233d-468e-4276-9f59-70f4ca1f26f3]") {
212216
const Complex c{0.0, -5.0};
213217

@@ -267,89 +271,99 @@ TEST_CASE("Complex exponential function -> Exponential of a purely real number",
267271

268272
// Extra Credit
269273
TEST_CASE(
270-
"Complex exponential function -> Exponential of a number with real and "
271-
"imaginary part",
274+
// clang-format off
275+
"Complex exponential function -> Exponential of a number with real and imaginary part",
276+
// clang-format on
272277
"[08eedacc-5a95-44fc-8789-1547b27a8702]") {
273278
const Complex c{std::log(2.0), M_PI};
274279

275280
require_approx_equal(Complex(-2.0, 0.0), c.exp());
276281
}
277282

278283
TEST_CASE(
279-
"Complex exponential function -> Exponential resulting in a number with "
280-
"real and imaginary part",
284+
// clang-format off
285+
"Complex exponential function -> Exponential resulting in a number with real and imaginary part",
286+
// clang-format on
281287
"[d2de4375-7537-479a-aa0e-d474f4f09859]") {
282288
const Complex c{std::log(2.0) / 2.0, M_PI / 4.0};
283289

284290
require_approx_equal(Complex(1.0, 1.0), c.exp());
285291
}
286292

287293
TEST_CASE(
288-
"Operations between real numbers and complex numbers -> Add real number to "
289-
"complex number",
294+
// clang-format off
295+
"Operations between real numbers and complex numbers -> Add real number to complex number",
296+
// clang-format on
290297
"[06d793bf-73bd-4b02-b015-3030b2c952ec]") {
291298
const Complex c{1.0, 2.0};
292299

293300
require_approx_equal(Complex(6.0, 2.0), c + 5.0);
294301
}
295302

296303
TEST_CASE(
297-
"Operations between real numbers and complex numbers -> Add complex number "
298-
"to real number",
304+
// clang-format off
305+
"Operations between real numbers and complex numbers -> Add complex number to real number",
306+
// clang-format on
299307
"[d77dbbdf-b8df-43f6-a58d-3acb96765328]") {
300308
const Complex c{1.0, 2.0};
301309

302310
require_approx_equal(Complex(6.0, 2.0), 5.0 + c);
303311
}
304312

305313
TEST_CASE(
306-
"Operations between real numbers and complex numbers -> Subtract real "
307-
"number from complex number",
314+
// clang-format off
315+
"Operations between real numbers and complex numbers -> Subtract real number from complex number",
316+
// clang-format on
308317
"[20432c8e-8960-4c40-ba83-c9d910ff0a0f]") {
309318
const Complex c{5.0, 7.0};
310319

311320
require_approx_equal(Complex(1.0, 7.0), c - 4.0);
312321
}
313322

314323
TEST_CASE(
315-
"Operations between real numbers and complex numbers -> Subtract complex "
316-
"number from real number",
324+
// clang-format off
325+
"Operations between real numbers and complex numbers -> Subtract complex number from real number",
326+
// clang-format on
317327
"[b4b38c85-e1bf-437d-b04d-49bba6e55000]") {
318328
const Complex c{5.0, 7.0};
319329

320330
require_approx_equal(Complex(-1.0, -7.0), 4.0 - c);
321331
}
322332

323333
TEST_CASE(
324-
"Operations between real numbers and complex numbers -> Multiply complex "
325-
"number by real number",
334+
// clang-format off
335+
"Operations between real numbers and complex numbers -> Multiply complex number by real number",
336+
// clang-format on
326337
"[dabe1c8c-b8f4-44dd-879d-37d77c4d06bd]") {
327338
const Complex c{2.0, 5.0};
328339

329340
require_approx_equal(Complex(10.0, 25.0), c * 5.0);
330341
}
331342

332343
TEST_CASE(
333-
"Operations between real numbers and complex numbers -> Multiply real "
334-
"number by complex number",
344+
// clang-format off
345+
"Operations between real numbers and complex numbers -> Multiply real number by complex number",
346+
// clang-format on
335347
"[6c81b8c8-9851-46f0-9de5-d96d314c3a28]") {
336348
const Complex c{2.0, 5.0};
337349

338350
require_approx_equal(Complex(10.0, 25.0), 5.0 * c);
339351
}
340352

341353
TEST_CASE(
342-
"Operations between real numbers and complex numbers -> Divide complex "
343-
"number by real number",
354+
// clang-format off
355+
"Operations between real numbers and complex numbers -> Divide complex number by real number",
356+
// clang-format on
344357
"[8a400f75-710e-4d0c-bcb4-5e5a00c78aa0]") {
345358
const Complex c{10.0, 100.0};
346359

347360
require_approx_equal(Complex(1.0, 10.0), c / 10.0);
348361
}
349362

350363
TEST_CASE(
351-
"Operations between real numbers and complex numbers -> Divide real number "
352-
"by complex number",
364+
// clang-format off
365+
"Operations between real numbers and complex numbers -> Divide real number by complex number",
366+
// clang-format on
353367
"[9a867d1b-d736-4c41-a41e-90bd148e9d5e]") {
354368
const Complex c{1.0, 1.0};
355369

exercises/practice/linked-list/linked_list_test.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ TEST_CASE("erases the element with the specified value from the list",
138138
}
139139

140140
TEST_CASE(
141-
"erases the element with the specified value from the list, re-assigns "
142-
"tail",
141+
// clang-format off
142+
"erases the element with the specified value from the list, re-assigns tail",
143+
// clang-format on
143144
"[59db191a-b17f-4ab7-9c5c-60711ec1d013]") {
144145
linked_list::List<int> llist{};
145146
llist.push(71);
@@ -152,8 +153,9 @@ TEST_CASE(
152153
}
153154

154155
TEST_CASE(
155-
"erases the element with the specified value from the list, re-assigns "
156-
"head",
156+
// clang-format off
157+
"erases the element with the specified value from the list, re-assigns head",
158+
// clang-format on
157159
"[58242222-5d39-415b-951d-8128247f8993]") {
158160
linked_list::List<int> llist{};
159161
llist.push(71);

exercises/practice/luhn/luhn_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ TEST_CASE("using ascii value for doubled non-digit isn't allowed",
110110
}
111111

112112
TEST_CASE(
113-
"non-numeric, non-space char in the middle with a sum that's divisible by "
114-
"10 isn't allowed",
113+
// clang-format off
114+
"non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed",
115+
// clang-format on
115116
"[8b72ad26-c8be-49a2-b99c-bcc3bf631b33]") {
116117
REQUIRE(false == luhn::valid("59%59"));
117118
}

exercises/practice/queen-attack/queen_attack_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ TEST_CASE("queens_can_attack_on_fourth_diagonal") {
104104
}
105105

106106
TEST_CASE(
107-
"queens_cannot_attack_if_falling_diagonals_are_only_the_same_when_"
108-
"reflected_across_the_longest_falling_diagonal") {
107+
// clang-format off
108+
"queens_cannot_attack_if_falling_diagonals_are_only_the_same_when_reflected_across_the_longest_falling_diagonal"
109+
// clang-format on
110+
) {
109111
const queen_attack::chess_board board{std::make_pair(4, 1),
110112
std::make_pair(2, 5)};
111113

exercises/practice/raindrops/raindrops_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ TEST_CASE("the_sound_for_6_is_pling_as_it_has_a_factor_3") {
2020
REQUIRE("Pling" == raindrops::convert(6));
2121
}
2222
TEST_CASE(
23-
"2_to_the_power_3_does_not_make_a_raindrop_sound_as_3_is_the_exponent_not_"
24-
"the_base") {
23+
// clang-format off
24+
"2_to_the_power_3_does_not_make_a_raindrop_sound_as_3_is_the_exponent_not_the_base"
25+
// clang-format on
26+
) {
2527
REQUIRE("8" == raindrops::convert(8));
2628
}
2729
TEST_CASE("the_sound_for_9_is_pling_as_it_has_a_factor_3") {

exercises/practice/two-bucket/two_bucket_test.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ CATCH_REGISTER_ENUM(two_bucket::bucket_id, two_bucket::bucket_id::one,
99
two_bucket::bucket_id::two)
1010

1111
TEST_CASE(
12-
"Measure using bucket one of size 3 and bucket two of size 5 - start with "
13-
"bucket one",
12+
// clang-format off
13+
"Measure using bucket one of size 3 and bucket two of size 5 - start with bucket one",
14+
// clang-format on
1415
"[a6f2b4ba-065f-4dca-b6f0-e3eee51cb661]") {
1516
auto bucket1_capacity = 3;
1617
auto bucket2_capacity = 5;
@@ -28,8 +29,9 @@ TEST_CASE(
2829
#if defined(EXERCISM_RUN_ALL_TESTS)
2930

3031
TEST_CASE(
31-
"Measure using bucket one of size 3 and bucket two of size 5 - start with "
32-
"bucket two",
32+
// clang-format off
33+
"Measure using bucket one of size 3 and bucket two of size 5 - start with bucket two",
34+
// clang-format on
3335
"[6c4ea451-9678-4926-b9b3-68364e066d40]") {
3436
auto bucket1_capacity = 3;
3537
auto bucket2_capacity = 5;
@@ -45,8 +47,9 @@ TEST_CASE(
4547
}
4648

4749
TEST_CASE(
48-
"Measure using bucket one of size 7 and bucket two of size 11 - start with "
49-
"bucket one",
50+
// clang-format off
51+
"Measure using bucket one of size 7 and bucket two of size 11 - start with bucket one",
52+
// clang-format on
5053
"[3389f45e-6a56-46d5-9607-75aa930502ff]") {
5154
auto bucket1_capacity = 7;
5255
auto bucket2_capacity = 11;
@@ -62,8 +65,9 @@ TEST_CASE(
6265
}
6366

6467
TEST_CASE(
65-
"Measure using bucket one of size 7 and bucket two of size 11 - start with "
66-
"bucket two",
68+
// clang-format off
69+
"Measure using bucket one of size 7 and bucket two of size 11 - start with bucket two",
70+
// clang-format on
6771
"[fe0ff9a0-3ea5-4bf7-b17d-6d4243961aa1]") {
6872
auto bucket1_capacity = 7;
6973
auto bucket2_capacity = 11;
@@ -79,8 +83,9 @@ TEST_CASE(
7983
}
8084

8185
TEST_CASE(
82-
"Measure one step using bucket one of size 1 and bucket two of size 3 - "
83-
"start with bucket two",
86+
// clang-format off
87+
"Measure one step using bucket one of size 1 and bucket two of size 3 - start with bucket two",
88+
// clang-format on
8489
"[0ee1f57e-da84-44f7-ac91-38b878691602]") {
8590
auto bucket1_capacity = 1;
8691
auto bucket2_capacity = 3;
@@ -96,8 +101,9 @@ TEST_CASE(
96101
}
97102

98103
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",
104+
// clang-format off
105+
"Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two",
106+
// clang-format on
101107
"[eb329c63-5540-4735-b30b-97f7f4df0f84]") {
102108
auto bucket1_capacity = 2;
103109
auto bucket2_capacity = 3;

0 commit comments

Comments
 (0)