diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-04-21 14:44:01 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-04-21 14:44:01 +0200 |
| commit | e8ce02d63f096147fc54824f0a45c23e3a3ced25 (patch) | |
| tree | e96658cb58f91c48d345348bb4e08491dac8581b /libs/kstd/tests/src/vector.cpp | |
| parent | e3fa6b1adbd7fce3b080d75fd0959949b7d3bef4 (diff) | |
| download | teachos-e8ce02d63f096147fc54824f0a45c23e3a3ced25.tar.xz teachos-e8ce02d63f096147fc54824f0a45c23e3a3ced25.zip | |
libs: prepare for clang-tidy
Diffstat (limited to 'libs/kstd/tests/src/vector.cpp')
| -rw-r--r-- | libs/kstd/tests/src/vector.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/kstd/tests/src/vector.cpp b/libs/kstd/tests/src/vector.cpp index 5faaaff..b826820 100644 --- a/libs/kstd/tests/src/vector.cpp +++ b/libs/kstd/tests/src/vector.cpp @@ -492,27 +492,27 @@ SCENARIO("Vector modifiers", "[vector]") WHEN("inserting an element") { - auto it = v.insert(v.cbegin(), 42); + auto it = v.insert(v.cbegin(), 40); THEN("the size and capacity increase and the element is inserted") { REQUIRE(v.size() == 1); REQUIRE(v.capacity() >= 1); - REQUIRE(v[0] == 42); + REQUIRE(v[0] == 40); REQUIRE(it == v.begin()); } } WHEN("inserting an lvalue element") { - auto const value = 42; + auto const value = 40; auto it = v.insert(v.cbegin(), value); THEN("the size and capacity increase and the element is inserted") { REQUIRE(v.size() == 1); REQUIRE(v.capacity() >= 1); - REQUIRE(v[0] == 42); + REQUIRE(v[0] == 40); REQUIRE(it == v.begin()); } } @@ -927,7 +927,7 @@ SCENARIO("Vector with non-default-constructible types", "[vector]") WHEN("using emplace_back") { auto v = kstd::vector<kstd::tests::non_default_constructible>{}; - v.emplace_back(42); + v.emplace_back(40); THEN("the element is added and the size and capacity increase") { @@ -965,7 +965,7 @@ SCENARIO("Vector modifier move semantics", "[vector]") GIVEN("An empty vector and a move tracker element") { auto v = kstd::vector<kstd::tests::special_member_tracker>{}; - auto tracker = kstd::tests::special_member_tracker{42}; + auto tracker = kstd::tests::special_member_tracker{40}; WHEN("push_back is called with the move tracker") { @@ -976,7 +976,7 @@ SCENARIO("Vector modifier move semantics", "[vector]") REQUIRE(v.size() == 1); REQUIRE(v.back().move_constructed_count == 1); REQUIRE(v.back().copy_constructed_count == 0); - REQUIRE(v.back().value == 42); + REQUIRE(v.back().value == 40); } THEN("the original tracker is left in a valid but unspecified state") @@ -992,14 +992,14 @@ SCENARIO("Vector modifier move semantics", "[vector]") WHEN("emplace_back is called with constructor arguments") { - v.emplace_back(42); + v.emplace_back(40); THEN("the element is constructed directly, without moves or copies") { REQUIRE(v.size() == 1); REQUIRE(v.back().move_constructed_count == 0); REQUIRE(v.back().copy_constructed_count == 0); - REQUIRE(v.back().value == 42); + REQUIRE(v.back().value == 40); } } } |
