|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
#include <bitset>#include <istream>#include <ostream>#include <cstdio>#include <climits>#include <rw_char.h>#include <rw_rand.h>#include <rw_driver.h>
Go to the source code of this file.
Data Structures | |
| struct | test_set< N > |
| struct | has_implicit_ctor |
| struct | MyAlloc< charT > |
Macros | |
| #define | NLOOPS 128 |
| #define | MEMFUN(result, name, arg_list) |
| #define | MEMFUN(result, name, arg_list) |
| #define | PARAMLIST_3(T) T, std::char_traits<T>, std::allocator<T> |
| #define | PARAMLIST_2(T) T, std::char_traits<T> |
| #define | FUN(result, name, arg_list) |
| #define | PARAMLIST(T) T, std::char_traits<T> |
| #define | TEST_OP(op) |
| #define | TO_STR(s) narrow_string (s).c_str () |
| #define | DO_TEST(N) run_test ((std::bitset<N>*)0) |
Functions | |
| std::size_t | bitmax (std::size_t n) |
| void | is_explicit (const std::bitset< 0 > &) |
| template<std::size_t N> | |
| void | test_ctors (const std::bitset< N > *) |
| template<std::size_t N> | |
| void | stress_ctors (const std::bitset< N > *) |
| template<std::size_t N> | |
| void | test_operators (const std::bitset< N > *) |
| template<std::size_t N> | |
| void | test_other (const std::bitset< N > *) |
| template<std::size_t N> | |
| void | stress_count (const std::bitset< N > *) |
| template<std::size_t N> | |
| void | test_elem_access (const std::bitset< N > *) |
| _RWSTD_NAMESPACE (std) | |
| const char * | type_name (char) |
| const char * | type_name (wchar_t) |
| const char * | type_name (const UserChar &) |
| template<class charT > | |
| const char * | traits_name (const std::char_traits< charT > *) |
| const char * | traits_name (const UserTraits< UserChar > *) |
| template<class charT > | |
| const char * | alloc_name (const std::allocator< charT > &) |
| template<class charT > | |
| const char * | alloc_name (const MyAlloc< charT > &) |
| template<class charT > | |
| charT & | assign (charT &lhs, char rhs) |
| UserChar & | assign (UserChar &lhs, char rhs) |
| template<class charT > | |
| int | compare (const charT str[], const char s[], const char bits[2]) |
| int | compare (const UserChar str[], const char s[], const char bits[2]) |
| template<std::size_t N, class charT , class Traits , class Alloc > | |
| std::basic_string< charT, Traits, Alloc > | bitset_to_string_3 (const std::bitset< N > &bs, int nfargs, charT zero, charT one, std::basic_string< charT, Traits, Alloc > *) |
| template<std::size_t N, class Traits , class Alloc > | |
| std::basic_string< UserChar, Traits, Alloc > | bitset_to_string_3 (const std::bitset< N > &bs, int nfargs, UserChar zero, UserChar one, std::basic_string< UserChar, Traits, Alloc > *) |
| template<std::size_t N, class charT , class Traits > | |
| std::basic_string< charT, Traits, std::allocator< charT > > | bitset_to_string_2 (const std::bitset< N > &bs, int nfargs, charT zero, charT one, std::basic_string< charT, Traits, std::allocator< charT > > *) |
| template<std::size_t N, class Traits > | |
| std::basic_string< UserChar, Traits, std::allocator< UserChar > > | bitset_to_string_2 (const std::bitset< N > &bs, int nfargs, UserChar zero, UserChar one, std::basic_string< UserChar, Traits, std::allocator< UserChar > > *) |
| template<std::size_t N, class charT > | |
| std::basic_string< charT, std::char_traits< charT >, std::allocator< charT > > | bitset_to_string_1 (const std::bitset< N > &bs, int nfargs, charT zero, charT one, std::basic_string< charT, std::char_traits< charT >, std::allocator< charT > > *) |
| template<std::size_t N> | |
| std::basic_string< UserChar, std::char_traits< UserChar >, std::allocator< UserChar > > | bitset_to_string_1 (const std::bitset< N > &bs, int nfargs, UserChar zero, UserChar one, std::basic_string< UserChar, std::char_traits< UserChar >, std::allocator< UserChar > > *) |
| template<std::size_t N> | |
| std::basic_string< char, std::char_traits< char >, std::allocator< char > > | bitset_to_string_0 (const std::bitset< N > &bs, int nfargs, char zero, char one, std::basic_string< char, std::char_traits< char >, std::allocator< char > > *) |
| char | to_char (char ch) |
| char | to_char (UserChar ch) |
| char | to_char (wchar_t ch) |
| template<class charT , class Traits , class Alloc > | |
| std::string | narrow_string (const std::basic_string< charT, Traits, Alloc > &str) |
| std::string | to_string (const char *str, const char bits[2]) |
| template<std::size_t N, class charT , class Traits , class Alloc > | |
| void | test_to_string (std::bitset< N > *, charT *, Traits *, Alloc *, bool nontemplate_done) |
| template<std::size_t N> | |
| void | test_to_string (const std::bitset< N > *) |
| template<std::size_t N> | |
| void | run_test (const std::bitset< N > *) |
| int | main (int argc, char *argv[]) |
| #define NLOOPS 128 |
23.bitset.cpp - test exercising [lib.bitset]
$Id$
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2001-2008 Rogue Wave Software, Inc.
Definition at line 41 of file 23.bitset.cpp.
| #define TEST_OP | ( | op | ) |
| #define TO_STR | ( | s | ) | narrow_string (s).c_str () |
Definition at line 1007 of file 23.bitset.cpp.
| _RWSTD_NAMESPACE | ( | std | ) |
Definition at line 742 of file 23.bitset.cpp.
Definition at line 786 of file 23.bitset.cpp.
Definition at line 778 of file 23.bitset.cpp.
Definition at line 794 of file 23.bitset.cpp.
Definition at line 799 of file 23.bitset.cpp.
| std::size_t bitmax | ( | std::size_t | n | ) |
Definition at line 47 of file 23.bitset.cpp.
| std::basic_string< char, std::char_traits< char >, std::allocator< char > > bitset_to_string_0 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| char | zero, | ||
| char | one, | ||
| std::basic_string< char, std::char_traits< char >, std::allocator< char > > * | |||
| ) |
Definition at line 970 of file 23.bitset.cpp.
| std::basic_string< charT, std::char_traits< charT >, std::allocator< charT > > bitset_to_string_1 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| charT | zero, | ||
| charT | one, | ||
| std::basic_string< charT, std::char_traits< charT >, std::allocator< charT > > * | |||
| ) |
Definition at line 924 of file 23.bitset.cpp.
| std::basic_string< UserChar, std::char_traits< UserChar >, std::allocator< UserChar > > bitset_to_string_1 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| UserChar | zero, | ||
| UserChar | one, | ||
| std::basic_string< UserChar, std::char_traits< UserChar >, std::allocator< UserChar > > * | |||
| ) |
Definition at line 944 of file 23.bitset.cpp.
| std::basic_string< charT, Traits, std::allocator< charT > > bitset_to_string_2 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| charT | zero, | ||
| charT | one, | ||
| std::basic_string< charT, Traits, std::allocator< charT > > * | |||
| ) |
Definition at line 883 of file 23.bitset.cpp.
| std::basic_string< UserChar, Traits, std::allocator< UserChar > > bitset_to_string_2 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| UserChar | zero, | ||
| UserChar | one, | ||
| std::basic_string< UserChar, Traits, std::allocator< UserChar > > * | |||
| ) |
Definition at line 901 of file 23.bitset.cpp.
| std::basic_string< charT, Traits, Alloc > bitset_to_string_3 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| charT | zero, | ||
| charT | one, | ||
| std::basic_string< charT, Traits, Alloc > * | |||
| ) |
Definition at line 843 of file 23.bitset.cpp.
| std::basic_string< UserChar, Traits, Alloc > bitset_to_string_3 | ( | const std::bitset< N > & | bs, |
| int | nfargs, | ||
| UserChar | zero, | ||
| UserChar | one, | ||
| std::basic_string< UserChar, Traits, Alloc > * | |||
| ) |
Definition at line 860 of file 23.bitset.cpp.
Definition at line 809 of file 23.bitset.cpp.
Definition at line 824 of file 23.bitset.cpp.
| void is_explicit | ( | const std::bitset< 0 > & | ) |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 1340 of file 23.bitset.cpp.
Definition at line 997 of file 23.bitset.cpp.
| void run_test | ( | const std::bitset< N > * | ) |
Definition at line 1285 of file 23.bitset.cpp.
| void stress_count | ( | const std::bitset< N > * | ) |
Definition at line 671 of file 23.bitset.cpp.
| void stress_ctors | ( | const std::bitset< N > * | ) |
Definition at line 450 of file 23.bitset.cpp.
| void test_ctors | ( | const std::bitset< N > * | ) |
Definition at line 376 of file 23.bitset.cpp.
| void test_elem_access | ( | const std::bitset< N > * | ) |
Definition at line 689 of file 23.bitset.cpp.
| void test_operators | ( | const std::bitset< N > * | ) |
Definition at line 482 of file 23.bitset.cpp.
| void test_other | ( | const std::bitset< N > * | ) |
Definition at line 592 of file 23.bitset.cpp.
| void test_to_string | ( | const std::bitset< N > * | ) |
Definition at line 1257 of file 23.bitset.cpp.
Definition at line 1026 of file 23.bitset.cpp.
|
inline |
Definition at line 987 of file 23.bitset.cpp.
|
inline |
Definition at line 988 of file 23.bitset.cpp.
|
inline |
Definition at line 991 of file 23.bitset.cpp.
| std::string to_string | ( | const char * | str, |
| const char | bits[2] | ||
| ) |
Definition at line 1012 of file 23.bitset.cpp.
Definition at line 762 of file 23.bitset.cpp.
| const char * traits_name | ( | const UserTraits< UserChar > * | ) |
Definition at line 769 of file 23.bitset.cpp.
| const char * type_name | ( | char | ) |
Definition at line 750 of file 23.bitset.cpp.
| const char * type_name | ( | const UserChar & | ) |
Definition at line 756 of file 23.bitset.cpp.
| const char * type_name | ( | wchar_t | ) |
Definition at line 753 of file 23.bitset.cpp.