Skip to content

Commit 1ec0c23

Browse files
Change v[i] == false to !v[i] as it's type is boolean-testable
1 parent 8921322 commit 1ec0c23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ TEST_CONSTEXPR_CXX23 void test_char_pointer_ctor()
8181
for (std::size_t i = 0; i < M; ++i)
8282
assert(v[i] == (not_null_terminated[M - 1 - i] == '1'));
8383
for (std::size_t i = 10; i < v.size(); ++i)
84-
assert(v[i] == false);
84+
assert(!v[i]);
8585
}
8686
{
8787
const char not_null_terminated[] = {'1', 'a', '1', 'a', '1', 'a', '1', 'a', '1', 'a'};
@@ -90,7 +90,7 @@ TEST_CONSTEXPR_CXX23 void test_char_pointer_ctor()
9090
for (std::size_t i = 0; i < M; ++i)
9191
assert(v[i] == (not_null_terminated[M - 1 - i] == '1'));
9292
for (std::size_t i = 10; i < v.size(); ++i)
93-
assert(v[i] == false);
93+
assert(!v[i]);
9494
}
9595
{
9696
const char not_null_terminated[] = {'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a'};
@@ -99,7 +99,7 @@ TEST_CONSTEXPR_CXX23 void test_char_pointer_ctor()
9999
for (std::size_t i = 0; i < M; ++i)
100100
assert(v[i] == (not_null_terminated[M - 1 - i] == 'b'));
101101
for (std::size_t i = 10; i < v.size(); ++i)
102-
assert(v[i] == false);
102+
assert(!v[i]);
103103
}
104104
}
105105

0 commit comments

Comments
 (0)