Skip to content

Commit ce2e68e

Browse files
committed
remove constinit test case as older compilers cannot cope#
1 parent 31e0f3e commit ce2e68e

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

tests/tests_mutex.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,8 @@ TEST_SUITE("mutex") {
1313
static_assert(!std::is_move_assignable_v<mutex<int>>);
1414

1515
TEST_CASE("defalt ctor") {
16-
{ // normal init
17-
mutex<int> mut{};
18-
CHECK_EQ(*mut.lock(), 0);
19-
}
20-
21-
{ // constexpr init
22-
static constinit mutex<int> cmut{};
23-
CHECK_EQ(*cmut.lock(), 0);
24-
}
16+
mutex<int> mut{};
17+
CHECK_EQ(*mut.lock(), 0);
2518
}
2619

2720
TEST_CASE("copy value inside") {

tests/tests_shared_mutex.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,8 @@ TEST_SUITE("shared_mutex") {
1313
static_assert(!std::is_move_assignable_v<shared_mutex<int>>);
1414

1515
TEST_CASE("defalt ctor") {
16-
{ // normal init
17-
shared_mutex<int> mut{};
18-
CHECK_EQ(*mut.lock(), 0);
19-
}
20-
21-
{ // constexpr init
22-
static constinit shared_mutex<int> cmut{};
23-
CHECK_EQ(*cmut.lock(), 0);
24-
}
16+
shared_mutex<int> mut{};
17+
CHECK_EQ(*mut.lock(), 0);
2518
}
2619

2720
TEST_CASE("copy value inside") {

0 commit comments

Comments
 (0)