Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / containers / sequences / vector.bool / initializer_list.pass.cpp
blob9b13922240d5740b5f33b644decb5917a1babac8
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03
11 // <vector>
13 // vector(initializer_list<value_type> il);
15 #include <vector>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "min_allocator.h"
21 TEST_CONSTEXPR_CXX20 bool tests()
24 std::vector<bool> d = {true, false, false, true};
25 assert(d.size() == 4);
26 assert(d[0] == true);
27 assert(d[1] == false);
28 assert(d[2] == false);
29 assert(d[3] == true);
32 std::vector<bool, min_allocator<bool>> d = {true, false, false, true};
33 assert(d.size() == 4);
34 assert(d[0] == true);
35 assert(d[1] == false);
36 assert(d[2] == false);
37 assert(d[3] == true);
40 return true;
43 int main(int, char**)
45 tests();
46 #if TEST_STD_VER > 17
47 static_assert(tests());
48 #endif
49 return 0;