1 // { dg-do compile { target c++20 } }
4 #include <testsuite_hooks.h>
17 static_assert( test_empty() );
23 VERIFY( v
.size() == 0 );
25 VERIFY( v
.size() == 1 );
27 VERIFY( v
.max_size() != 0 );
32 static_assert( test_size() );
38 VERIFY( v
.size() == 0 );
39 VERIFY( v
.capacity() == v
.size() );
41 VERIFY( v
.size() == 3 );
42 VERIFY( v
.capacity() == v
.size() );
47 static_assert( test_capacity() );
54 VERIFY( v
.size() == 0 );
55 VERIFY( v
.capacity() == 9 );
57 VERIFY( v
.size() == 5 );
58 VERIFY( v
.capacity() == 9 );
60 VERIFY( v
.size() == 15 );
66 static_assert( test_resize() );
73 VERIFY( v
.size() == 0 );
74 VERIFY( v
.capacity() == 9 );
76 VERIFY( v
.size() == 2 );
77 VERIFY( v
.capacity() == 9 );
82 static_assert( test_reserve() );
91 VERIFY( v
.capacity() == 0 );
93 VERIFY( v
.capacity() == 9 );
99 VERIFY( v
.capacity() == v
.size() );
101 VERIFY( v
.capacity() == 9 );
107 static_assert( test_shrink_to_fit() );