//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // deque(size_type n, const value_type& v); #include #include #include "../../../stack_allocator.h" template void test(unsigned n, const T& x) { typedef std::deque C; typedef typename C::const_iterator const_iterator; C d(n, x); assert(d.size() == n); assert(distance(d.begin(), d.end()) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == x); } int main() { test >(0, 5); test >(1, 10); test >(10, 11); test >(1023, -11); test >(1024, 25); test >(1025, 0); test >(2047, 110); test >(2048, -500); test >(2049, 654); test >(4095, 78); test >(4096, 1165); test >(4097, 157); test >(4095, 90); }