f8754f1df1581a1d702567e8cb1ba4dbb4e4ae67
[platform/framework/web/crosswalk.git] / src / third_party / libc++ / trunk / test / containers / sequences / deque / deque.cons / default.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <deque>
11
12 // deque()
13
14 #include <deque>
15 #include <cassert>
16
17 #include "../../../stack_allocator.h"
18 #include "../../../NotConstructible.h"
19 #include "min_allocator.h"
20
21 template <class T, class Allocator>
22 void
23 test()
24 {
25     std::deque<T, Allocator> d;
26     assert(d.size() == 0);
27 }
28
29 int main()
30 {
31     test<int, std::allocator<int> >();
32     test<NotConstructible, stack_allocator<NotConstructible, 1> >();
33 #if __cplusplus >= 201103L
34     test<int, min_allocator<int> >();
35     test<NotConstructible, min_allocator<NotConstructible> >();
36 #endif
37 }