[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / containers / sequences / list / list.cons / initializer_list.pass.cpp
blob8583d67dd2f3f693bc84d0402e3f2983bb758139
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 // <list>
13 // list(initializer_list<value_type> il);
15 #include <list>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "min_allocator.h"
21 int main(int, char**)
24 std::list<int> d = {3, 4, 5, 6};
25 assert(d.size() == 4);
26 std::list<int>::iterator i = d.begin();
27 assert(*i++ == 3);
28 assert(*i++ == 4);
29 assert(*i++ == 5);
30 assert(*i++ == 6);
33 std::list<int, min_allocator<int>> d = {3, 4, 5, 6};
34 assert(d.size() == 4);
35 std::list<int, min_allocator<int>>::iterator i = d.begin();
36 assert(*i++ == 3);
37 assert(*i++ == 4);
38 assert(*i++ == 5);
39 assert(*i++ == 6);
42 return 0;