• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 //===----------------------------------------------------------------------===//
8 
9 // test size_t count() const;
10 
11 #include <bitset>
12 #include <cassert>
13 
14 #include "test_macros.h"
15 
16 template <std::size_t N>
test_size()17 void test_size() {
18     const std::bitset<N> v;
19     assert(v.size() == N);
20 }
21 
main(int,char **)22 int main(int, char**) {
23     test_size<0>();
24     test_size<1>();
25     test_size<31>();
26     test_size<32>();
27     test_size<33>();
28     test_size<63>();
29     test_size<64>();
30     test_size<65>();
31     test_size<1000>();
32 
33     return 0;
34 }
35