Skip to content

Commit 5ef53b1

Browse files
author
LoS
committed
Non-constant instances have been made constant in data_const.pass.cpp tests
1 parent 32bc029 commit 5ef53b1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ TEST_CONSTEXPR_CXX20 bool tests()
3939
assert(is_contiguous_container_asan_correct(v));
4040
}
4141
{
42-
std::vector<Nasty> v(100);
42+
const std::vector<Nasty> v(100);
4343
assert(v.data() == std::addressof(v.front()));
4444
assert(is_contiguous_container_asan_correct(v));
4545
}
@@ -55,24 +55,24 @@ TEST_CONSTEXPR_CXX20 bool tests()
5555
assert(is_contiguous_container_asan_correct(v));
5656
}
5757
{
58-
std::vector<Nasty, min_allocator<Nasty>> v(100);
58+
const std::vector<Nasty, min_allocator<Nasty>> v(100);
5959
assert(v.data() == std::addressof(v.front()));
6060
assert(is_contiguous_container_asan_correct(v));
6161
}
6262
{
63-
const std::vector<int, safe_allocator<int>> v;
64-
assert(v.data() == 0);
65-
assert(is_contiguous_container_asan_correct(v));
63+
const std::vector<int, safe_allocator<int>> v;
64+
assert(v.data() == 0);
65+
assert(is_contiguous_container_asan_correct(v));
6666
}
6767
{
68-
const std::vector<int, safe_allocator<int>> v(100);
69-
assert(v.data() == &v.front());
70-
assert(is_contiguous_container_asan_correct(v));
68+
const std::vector<int, safe_allocator<int>> v(100);
69+
assert(v.data() == &v.front());
70+
assert(is_contiguous_container_asan_correct(v));
7171
}
7272
{
73-
std::vector<Nasty, safe_allocator<Nasty>> v(100);
74-
assert(v.data() == std::addressof(v.front()));
75-
assert(is_contiguous_container_asan_correct(v));
73+
const std::vector<Nasty, safe_allocator<Nasty>> v(100);
74+
assert(v.data() == std::addressof(v.front()));
75+
assert(is_contiguous_container_asan_correct(v));
7676
}
7777
#endif
7878

0 commit comments

Comments
 (0)