Skip to content

Commit 874496a

Browse files
committed
Make libc++ tests explicit
1 parent 9b06b9f commit 874496a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
8686
assert(s.capacity() <= capacity);
8787
assert(s.size() == size);
8888
LIBCPP_ASSERT(is_string_asan_correct(s));
89-
if (s.capacity() == capacity)
90-
LIBCPP_ASSERT(s.data() == data);
89+
LIBCPP_ASSERT(s.capacity() == capacity && s.data() == data);
9190
}
9291
{ // Test with custom allocator with a minimum power of two allocation size
9392
std::basic_string<char, std::char_traits<char>, pow2_allocator<char> > s(
@@ -99,8 +98,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
9998
assert(s.capacity() <= capacity);
10099
assert(s.size() == size);
101100
LIBCPP_ASSERT(is_string_asan_correct(s));
102-
if (s.capacity() == capacity)
103-
LIBCPP_ASSERT(s.data() == data);
101+
LIBCPP_ASSERT(s.capacity() == capacity && s.data() == data);
104102
}
105103
}
106104

0 commit comments

Comments
 (0)