Skip to content

Commit bfd62af

Browse files
vaengahans
andauthored
Apply suggestions from code review
Co-authored-by: Alexander Hans <[email protected]>
1 parent db8205d commit bfd62af

File tree

4 files changed

+33
-8
lines changed

4 files changed

+33
-8
lines changed

exercises/concept/lasagna-master/lasagna_master_test.cpp

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

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

exercises/concept/pacman-rules/pacman_rules_test.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ 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("ghost does not get eaten because no power pellet is active, even if not touching ghost",
23+
TEST_CASE(
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
2427
"[task_1]") {
2528
REQUIRE_FALSE(can_eat_ghost(false, false));
2629
}

exercises/practice/allergies/allergies_test.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,18 @@ 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("testing for strawberries allergy -> allergic to strawberries and something else",
99+
TEST_CASE(
100+
// clang-format off
101+
"testing for strawberries allergy -> allergic to strawberries and something else",
102+
// clang-format on
100103
"[50f5f8f3-3bac-47e6-8dba-2d94470a4bc6]") {
101104
REQUIRE(true == allergies::allergy_test(28).is_allergic_to("strawberries"));
102105
}
103106

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

exercises/practice/complex-numbers/complex_numbers_test.cpp

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

124-
TEST_CASE("Arithmetic -> Subtraction -> Subtract numbers with real and imaginary part",
124+
TEST_CASE(
125+
// clang-format off
126+
"Arithmetic -> Subtraction -> Subtract numbers with real and imaginary part",
127+
// clang-format on
125128
"[f876feb1-f9d1-4d34-b067-b599a8746400]") {
126129
const Complex c1{1.0, 2.0};
127130
const Complex c2{3.0, 4.0};
@@ -145,7 +148,10 @@ TEST_CASE("Arithmetic -> Multiplication -> Multiply purely imaginary numbers",
145148
require_approx_equal(Complex(-2.0, 0.0), c1 * c2);
146149
}
147150

148-
TEST_CASE("Arithmetic -> Multiplication -> Multiply numbers with real and imaginary part",
151+
TEST_CASE(
152+
// clang-format off
153+
"Arithmetic -> Multiplication -> Multiply numbers with real and imaginary part",
154+
// clang-format on
149155
"[4d1d10f0-f8d4-48a0-b1d0-f284ada567e6]") {
150156
const Complex c1{1.0, 2.0};
151157
const Complex c2{3.0, 4.0};
@@ -192,14 +198,20 @@ TEST_CASE("Absolute value -> Absolute value of a negative purely real number",
192198
REQUIRE_THAT(c.abs(), Catch::Matchers::WithinAbs(5.0, eps));
193199
}
194200

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

199208
REQUIRE_THAT(c.abs(), Catch::Matchers::WithinAbs(5.0, eps));
200209
}
201210

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

0 commit comments

Comments
 (0)