|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
#include <rw/_defs.h>#include <locale>#include <climits>#include <clocale>#include <cstring>#include <cctype>#include <cstdio>#include <cstdlib>#include <cwchar>#include <cwctype>#include <langinfo.h>#include <rw_driver.h>#include <rw_file.h>#include <rw_locale.h>
Go to the source code of this file.
Macros | |
| #define | LC_MESSAGES _RWSTD_LC_MESSAGES |
| #define | NLOOPS 25 |
| #define | MAX_STR_SIZE 16 |
| #define | LOCALES |
| #define | BEGIN_LOCALE_LOOP(num, locname, loop_cntrl) |
| #define | END_LOCALE_LOOP(locname) |
| #define | ALPHA std::ctype_base::alpha |
| #define | UPPER std::ctype_base::upper |
| #define | LOWER std::ctype_base::lower |
| #define | DIGIT std::ctype_base::digit |
| #define | SPACE std::ctype_base::space |
| #define | CNTRL std::ctype_base::cntrl |
| #define | PUNCT std::ctype_base::punct |
| #define | XDIGIT std::ctype_base::xdigit |
| #define | GRAPH std::ctype_base::graph |
| #define | PRINT std::ctype_base::print |
| #define | SCAN(what) |
| #define | STR(x) #x |
| #define | COND1(what) |
| #define | COND3(what) |
| #define | IS(what) |
| #define | IS(what) |
| #define | TEST(lower, upper) |
| #define | TEST(ch, m) |
Typedefs | |
| typedef unsigned char | UChar |
Functions | |
| int | libc_isalpha (char ch) |
| int | libc_isspace (char ch) |
| int | libc_isprint (char ch) |
| int | libc_iscntrl (char ch) |
| int | libc_isupper (char ch) |
| int | libc_islower (char ch) |
| int | libc_isdigit (char ch) |
| int | libc_ispunct (char ch) |
| int | libc_isxdigit (char ch) |
| int | libc_isalnum (char ch) |
| int | libc_isgraph (char ch) |
| char | libc_tolower (char ch) |
| char | libc_toupper (char ch) |
| std::ctype_base::mask | libc_mask (int mask, char ch, const char *locname) |
| bool | libc_is (std::ctype_base::mask mask, char ch, const char *locname) |
| std::size_t | c_strlen (const char *s1) |
| int | c_strcmp (const char *s1, const char *s2) |
| const char * | narrow (char *dst, const char *src) |
| const char * | widen (char *dst, const char *src) |
| char | widen (char, char ch, const char *) |
| char | narrow (char ch, const char *) |
| bool | cond1 (std::ctype_base::mask mask, char ch, const char *locname) |
| bool | cond3 (std::ctype_base::mask, char, const char *) |
| int | libc_isalpha (wchar_t ch) |
| int | libc_isspace (wchar_t ch) |
| int | libc_isprint (wchar_t ch) |
| int | libc_iscntrl (wchar_t ch) |
| int | libc_isupper (wchar_t ch) |
| int | libc_islower (wchar_t ch) |
| int | libc_isdigit (wchar_t ch) |
| int | libc_ispunct (wchar_t ch) |
| int | libc_isxdigit (wchar_t ch) |
| int | libc_isalnum (wchar_t ch) |
| int | libc_isgraph (wchar_t ch) |
| wchar_t | libc_tolower (wchar_t ch) |
| wchar_t | libc_toupper (wchar_t ch) |
| std::size_t | c_strlen (const wchar_t *s1) |
| int | c_strcmp (const wchar_t *s1, const wchar_t *s2) |
| const char * | narrow (char *dst, const wchar_t *src) |
| const wchar_t * | widen (wchar_t *dst, const char *src) |
| std::ctype_base::mask | libc_mask (int mask, wchar_t ch, const char *locname) |
| bool | libc_is (std::ctype_base::mask mask, wchar_t ch, const char *locname) |
| wchar_t | widen (wchar_t, char ch, const char *locname) |
| char | narrow (wchar_t ch, const char *locname) |
| bool | cond3 (std::ctype_base::mask mask, wchar_t ch, const char *locname) |
| template<class charT > | |
| void | gen_str (charT *str, std::size_t size) |
| template<class charT > | |
| void | test_is (charT, const char *cname) |
| template<class charT > | |
| void | test_toupper_tolower (charT, const char *cname) |
| template<class charT > | |
| void | test_scan (charT, const char *cname) |
| template<class charT > | |
| void | test_narrow_widen (charT, const char *cname) |
| template<class charT > | |
| void | test_is_ch (charT, const char *cname) |
| template<class charT > | |
| void | test_libc (charT, const char *cname) |
| template<class charT > | |
| void | test_libstd_scan_is (charT, const char *cname, const std::ctype< charT > &ct, const char *str, std::ctype_base::mask mask, int expected_idx, int fwiden=0) |
| template<class charT > | |
| void | test_libstd_scan_not (charT, const char *cname, const std::ctype< charT > &ct, const char *str, std::ctype_base::mask mask, int expected_idx, int fwiden=0) |
| template<class charT > | |
| void | test_libstd_toupper_tolower (charT, const char *cname, const std::ctype< charT > &ct, const char *locname) |
| template<class charT > | |
| void | test_libstd_mask (charT, const char *cname, const std::ctype< charT > &ct, const char *locname) |
| template<class charT > | |
| void | test_libstd (charT, const char *cname) |
| int | main (int argc, char *argv[]) |
Variables | |
| const char * | locale_root |
| const char * | locale_list = 0 |
| #define ALPHA std::ctype_base::alpha |
Definition at line 113 of file 22.locale.ctype.cpp.
| #define BEGIN_LOCALE_LOOP | ( | num, | |
| locname, | |||
| loop_cntrl | |||
| ) |
Definition at line 88 of file 22.locale.ctype.cpp.
| #define CNTRL std::ctype_base::cntrl |
Definition at line 118 of file 22.locale.ctype.cpp.
| #define COND1 | ( | what | ) |
| #define COND3 | ( | what | ) |
| #define DIGIT std::ctype_base::digit |
Definition at line 116 of file 22.locale.ctype.cpp.
| #define END_LOCALE_LOOP | ( | locname | ) |
Definition at line 101 of file 22.locale.ctype.cpp.
| #define GRAPH std::ctype_base::graph |
Definition at line 121 of file 22.locale.ctype.cpp.
| #define IS | ( | what | ) |
| #define IS | ( | what | ) |
| #define LC_MESSAGES _RWSTD_LC_MESSAGES |
22.locale.ctype.cpp - Tests exercising the ctype facet
$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-2006 Rogue Wave Software.
Definition at line 63 of file 22.locale.ctype.cpp.
| #define LOCALES |
Definition at line 81 of file 22.locale.ctype.cpp.
| #define LOWER std::ctype_base::lower |
Definition at line 115 of file 22.locale.ctype.cpp.
| #define MAX_STR_SIZE 16 |
Definition at line 79 of file 22.locale.ctype.cpp.
| #define NLOOPS 25 |
Definition at line 78 of file 22.locale.ctype.cpp.
| #define PRINT std::ctype_base::print |
Definition at line 122 of file 22.locale.ctype.cpp.
| #define PUNCT std::ctype_base::punct |
Definition at line 119 of file 22.locale.ctype.cpp.
| #define SCAN | ( | what | ) |
| #define SPACE std::ctype_base::space |
Definition at line 117 of file 22.locale.ctype.cpp.
| #define TEST | ( | ch, | |
| m | |||
| ) |
| #define UPPER std::ctype_base::upper |
Definition at line 114 of file 22.locale.ctype.cpp.
| #define XDIGIT std::ctype_base::xdigit |
Definition at line 120 of file 22.locale.ctype.cpp.
| typedef unsigned char UChar |
Definition at line 111 of file 22.locale.ctype.cpp.
| int c_strcmp | ( | const char * | s1, |
| const char * | s2 | ||
| ) |
Definition at line 245 of file 22.locale.ctype.cpp.
Definition at line 402 of file 22.locale.ctype.cpp.
| std::size_t c_strlen | ( | const char * | s1 | ) |
Definition at line 240 of file 22.locale.ctype.cpp.
| std::size_t c_strlen | ( | const wchar_t * | s1 | ) |
Definition at line 397 of file 22.locale.ctype.cpp.
| bool cond1 | ( | std::ctype_base::mask | mask, |
| char | ch, | ||
| const char * | locname | ||
| ) |
Definition at line 283 of file 22.locale.ctype.cpp.
Definition at line 563 of file 22.locale.ctype.cpp.
| bool cond3 | ( | std::ctype_base::mask | , |
| char | , | ||
| const char * | |||
| ) |
Definition at line 324 of file 22.locale.ctype.cpp.
Definition at line 598 of file 22.locale.ctype.cpp.
|
inline |
Definition at line 233 of file 22.locale.ctype.cpp.
Definition at line 494 of file 22.locale.ctype.cpp.
| int libc_isalnum | ( | char | ch | ) |
Definition at line 171 of file 22.locale.ctype.cpp.
| int libc_isalnum | ( | wchar_t | ch | ) |
Definition at line 377 of file 22.locale.ctype.cpp.
| int libc_isalpha | ( | char | ch | ) |
Definition at line 126 of file 22.locale.ctype.cpp.
| int libc_isalpha | ( | wchar_t | ch | ) |
Definition at line 332 of file 22.locale.ctype.cpp.
| int libc_iscntrl | ( | char | ch | ) |
Definition at line 141 of file 22.locale.ctype.cpp.
| int libc_iscntrl | ( | wchar_t | ch | ) |
Definition at line 347 of file 22.locale.ctype.cpp.
| int libc_isdigit | ( | char | ch | ) |
Definition at line 156 of file 22.locale.ctype.cpp.
| int libc_isdigit | ( | wchar_t | ch | ) |
Definition at line 362 of file 22.locale.ctype.cpp.
| int libc_isgraph | ( | char | ch | ) |
Definition at line 176 of file 22.locale.ctype.cpp.
| int libc_isgraph | ( | wchar_t | ch | ) |
Definition at line 382 of file 22.locale.ctype.cpp.
| int libc_islower | ( | char | ch | ) |
Definition at line 151 of file 22.locale.ctype.cpp.
| int libc_islower | ( | wchar_t | ch | ) |
Definition at line 357 of file 22.locale.ctype.cpp.
| int libc_isprint | ( | char | ch | ) |
Definition at line 136 of file 22.locale.ctype.cpp.
| int libc_isprint | ( | wchar_t | ch | ) |
Definition at line 342 of file 22.locale.ctype.cpp.
| int libc_ispunct | ( | char | ch | ) |
Definition at line 161 of file 22.locale.ctype.cpp.
| int libc_ispunct | ( | wchar_t | ch | ) |
Definition at line 367 of file 22.locale.ctype.cpp.
| int libc_isspace | ( | char | ch | ) |
Definition at line 131 of file 22.locale.ctype.cpp.
| int libc_isspace | ( | wchar_t | ch | ) |
Definition at line 337 of file 22.locale.ctype.cpp.
| int libc_isupper | ( | char | ch | ) |
Definition at line 146 of file 22.locale.ctype.cpp.
| int libc_isupper | ( | wchar_t | ch | ) |
Definition at line 352 of file 22.locale.ctype.cpp.
| int libc_isxdigit | ( | char | ch | ) |
Definition at line 166 of file 22.locale.ctype.cpp.
| int libc_isxdigit | ( | wchar_t | ch | ) |
Definition at line 372 of file 22.locale.ctype.cpp.
| std::ctype_base::mask libc_mask | ( | int | mask, |
| char | ch, | ||
| const char * | locname | ||
| ) |
Definition at line 191 of file 22.locale.ctype.cpp.
| std::ctype_base::mask libc_mask | ( | int | mask, |
| wchar_t | ch, | ||
| const char * | locname | ||
| ) |
Definition at line 454 of file 22.locale.ctype.cpp.
| char libc_tolower | ( | char | ch | ) |
Definition at line 181 of file 22.locale.ctype.cpp.
Definition at line 387 of file 22.locale.ctype.cpp.
| char libc_toupper | ( | char | ch | ) |
Definition at line 186 of file 22.locale.ctype.cpp.
Definition at line 392 of file 22.locale.ctype.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 1710 of file 22.locale.ctype.cpp.
| const char * narrow | ( | char * | dst, |
| const char * | src | ||
| ) |
Definition at line 251 of file 22.locale.ctype.cpp.
| const char * narrow | ( | char * | dst, |
| const wchar_t * | src | ||
| ) |
Definition at line 409 of file 22.locale.ctype.cpp.
| char narrow | ( | char | ch, |
| const char * | |||
| ) |
Definition at line 276 of file 22.locale.ctype.cpp.
| char narrow | ( | wchar_t | ch, |
| const char * | locname | ||
| ) |
Definition at line 532 of file 22.locale.ctype.cpp.
Definition at line 619 of file 22.locale.ctype.cpp.
Definition at line 1050 of file 22.locale.ctype.cpp.
Definition at line 1257 of file 22.locale.ctype.cpp.
Definition at line 1461 of file 22.locale.ctype.cpp.
| void test_libstd_mask | ( | charT | , |
| const char * | cname, | ||
| const std::ctype< charT > & | ct, | ||
| const char * | locname | ||
| ) |
Definition at line 1360 of file 22.locale.ctype.cpp.
| void test_libstd_scan_is | ( | charT | , |
| const char * | cname, | ||
| const std::ctype< charT > & | ct, | ||
| const char * | str, | ||
| std::ctype_base::mask | mask, | ||
| int | expected_idx, | ||
| int | fwiden = 0 |
||
| ) |
Definition at line 1269 of file 22.locale.ctype.cpp.
| void test_libstd_scan_not | ( | charT | , |
| const char * | cname, | ||
| const std::ctype< charT > & | ct, | ||
| const char * | str, | ||
| std::ctype_base::mask | mask, | ||
| int | expected_idx, | ||
| int | fwiden = 0 |
||
| ) |
Definition at line 1297 of file 22.locale.ctype.cpp.
| void test_libstd_toupper_tolower | ( | charT | , |
| const char * | cname, | ||
| const std::ctype< charT > & | ct, | ||
| const char * | locname | ||
| ) |
Definition at line 1325 of file 22.locale.ctype.cpp.
Definition at line 840 of file 22.locale.ctype.cpp.
Definition at line 740 of file 22.locale.ctype.cpp.
Definition at line 680 of file 22.locale.ctype.cpp.
| const char * widen | ( | char * | dst, |
| const char * | src | ||
| ) |
Definition at line 261 of file 22.locale.ctype.cpp.
| char widen | ( | char | , |
| char | ch, | ||
| const char * | |||
| ) |
Definition at line 271 of file 22.locale.ctype.cpp.
Definition at line 432 of file 22.locale.ctype.cpp.
Definition at line 501 of file 22.locale.ctype.cpp.
| const char* locale_list = 0 |
Definition at line 86 of file 22.locale.ctype.cpp.
| const char* locale_root |
Definition at line 76 of file 22.locale.ctype.cpp.