File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
libcxx/test/std/containers/sequences/vector.bool Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 2424template <unsigned N, class A >
2525TEST_CONSTEXPR_CXX20 void test (const A& a) {
2626 std::vector<bool , A> v (N, false , a);
27- std::vector<bool , A> v0 (N, false , a);
27+ std::vector<bool , A> original (N, false , a);
2828 for (unsigned i = 1 ; i < N; i += 2 ) {
29- v[i] = true ;
30- v0 [i] = true ;
29+ v[i] = true ;
30+ original [i] = true ;
3131 }
3232 std::vector<bool , A> v2 = std::move (v);
33- assert (v2 == v0 );
34- assert (v.empty ()); // The moved-from vector is guarantted to be empty after move-construction
35- assert (v2.get_allocator () == v0 .get_allocator ());
33+ assert (v2 == original );
34+ assert (v.empty ()); // The moved-from vector is guaranteed to be empty after move-construction
35+ assert (v2.get_allocator () == original .get_allocator ());
3636}
3737
3838TEST_CONSTEXPR_CXX20 bool tests () {
Original file line number Diff line number Diff line change 2424template <unsigned N, class A >
2525TEST_CONSTEXPR_CXX20 void test (const A& a, const A& a0) {
2626 std::vector<bool , A> v (N, false , a);
27- std::vector<bool , A> v0 (N, false , a0);
27+ std::vector<bool , A> original (N, false , a0);
2828 for (unsigned i = 1 ; i < N; i += 2 ) {
29- v[i] = true ;
30- v0 [i] = true ;
29+ v[i] = true ;
30+ original [i] = true ;
3131 }
3232 std::vector<bool , A> v2 (std::move (v), a0);
33- assert (v2 == v0 );
33+ assert (v2 == original );
3434 assert (v2.get_allocator () == a0);
3535 if (a == a0)
36- assert (v.empty ()); // After container-move, the vector is guarantted to be empty
36+ assert (v.empty ()); // After container-move, the vector is guaranteed to be empty
3737 else
3838 LIBCPP_ASSERT (!v.empty ()); // After element-wise move, the RHS vector is not necessarily empty
3939}
You can’t perform that action at this time.
0 commit comments