]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/23_containers/bitset/all/1.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 23_containers / bitset / all / 1.cc
CommitLineData
731b672f 1// 2007-11-23 Paolo Carlini <pcarlini@suse.de>
2
fbd26352 3// Copyright (C) 2007-2019 Free Software Foundation, Inc.
731b672f 4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
6bc9506f 8// Free Software Foundation; either version 3, or (at your option)
731b672f 9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License along
6bc9506f 17// with this library; see the file COPYING3. If not see
18// <http://www.gnu.org/licenses/>.
731b672f 19
20// 23.3.5.2 bitset members
21
22#include <bitset>
23#include <testsuite_hooks.h>
24
25// DR 693. std::bitset::all() missing.
26void test01()
27{
731b672f 28 std::bitset<0> z1;
29 VERIFY( z1.all() );
30 z1.set();
31 VERIFY( z1.all() );
32
33 std::bitset<8> z2;
34 VERIFY( !z2.all() );
35 z2.set();
36 VERIFY( z2.all() );
37
38 std::bitset<16> z3;
39 VERIFY( !z3.all() );
40 z3.set();
41 VERIFY( z3.all() );
42
43 std::bitset<32> z4;
44 VERIFY( !z4.all() );
45 z4.set();
46 VERIFY( z4.all() );
47
48 std::bitset<64> z5;
49 VERIFY( !z5.all() );
50 z5.set();
51 VERIFY( z5.all() );
52
53 std::bitset<96> z6;
54 VERIFY( !z6.all() );
55 z6.set();
56 VERIFY( z6.all() );
57
58 std::bitset<128> z7;
59 VERIFY( !z7.all() );
60 z7.set();
61 VERIFY( z7.all() );
62
63 std::bitset<192> z8;
64 VERIFY( !z8.all() );
65 z8.set();
66 VERIFY( z8.all() );
67
68 std::bitset<1024> z9;
69 VERIFY( !z9.all() );
70 z9.set();
71 VERIFY( z9.all() );
72}
73
74int main()
75{
76 test01();
77 return 0;
78}