Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Macros | Functions | Variables
0.ctype.cpp File Reference
#include <rw_char.h>
#include <rw_ctype.h>
#include <rw_printf.h>
#include <rw_driver.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for 0.ctype.cpp:

Go to the source code of this file.

Macros

#define TEST(func)
 

Functions

template<class charT >
void test_id (charT *, const char *cname)
 
template<class charT >
void test_is (charT *, const char *cname, std::ctype_base::mask m, const char *chars, std::size_t n_chars)
 
template<class charT >
void test_is (charT *, const char *cname)
 
template<class charT >
void test_scan_is (charT *, const char *cname)
 
template<class charT >
void test_scan_not (charT *, const char *cname)
 
template<class charT >
void test_toupper (charT *, const char *cname)
 
template<class charT >
void test_tolower (charT *, const char *cname)
 
template<class charT >
void test_widen (charT *, const char *cname)
 
template<class charT >
void test_narrow (charT *, const char *cname)
 
template<class charT >
void test (charT *, const char *cname)
 
int main (int argc, char *argv[])
 

Variables

const char cntrl []
 
const std::size_t n_cntrl = sizeof cntrl - 1
 
const char digits [] = "0123456789"
 
const std::size_t n_digits = sizeof digits - 1
 
const char graph [] = "!\"#$%&\\‍()*+,-./0123456789:;<=>?@[]^_`{|}~"
 
const std::size_t n_graph = sizeof graph - 1
 
const char lower [] = "abcdefghijklmnopqrstuvwxyz"
 
const std::size_t n_lower = sizeof lower - 1
 
const char punct [] = "!#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~"
 
const std::size_t n_punct = sizeof punct - 1
 
const char print []
 
const std::size_t n_print = sizeof print - 1
 
const char spaces [] = " \t\v\f\r\n"
 
const std::size_t n_spaces = sizeof spaces - 1
 
const char upper [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
const std::size_t n_upper = sizeof upper - 1
 
const char xdigits [] = "0123456789ABCDEFabcdef"
 
const std::size_t n_xdigits = sizeof xdigits - 1
 
unsigned opt_id
 
unsigned opt_is
 
unsigned opt_scan_is
 
unsigned opt_scan_not
 
unsigned opt_toupper
 
unsigned opt_tolower
 
unsigned opt_widen
 
unsigned opt_narrow
 

Macro Definition Documentation

◆ TEST

#define TEST (   func)
Value:
if (0 <= opt_ ## func) \
test_ ## func ((charT*)0, cname); \
else \
rw_note (0, 0, __LINE__, \
"UserCtype<%s>::%s() tests disabled", \
cname, # func)
#define charT
Definition 17.names.cpp:456

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 474 of file 0.ctype.cpp.

◆ test()

template<class charT >
void test ( charT *  ,
const char *  cname 
)

Definition at line 433 of file 0.ctype.cpp.

◆ test_id()

template<class charT >
void test_id ( charT *  ,
const char *  cname 
)

Definition at line 110 of file 0.ctype.cpp.

◆ test_is() [1/2]

template<class charT >
void test_is ( charT *  ,
const char *  cname 
)

Definition at line 210 of file 0.ctype.cpp.

◆ test_is() [2/2]

template<class charT >
void test_is ( charT *  ,
const char *  cname,
std::ctype_base::mask  m,
const char *  chars,
std::size_t  n_chars 
)

Definition at line 127 of file 0.ctype.cpp.

◆ test_narrow()

template<class charT >
void test_narrow ( charT *  ,
const char *  cname 
)

Definition at line 398 of file 0.ctype.cpp.

◆ test_scan_is()

template<class charT >
void test_scan_is ( charT *  ,
const char *  cname 
)

Definition at line 312 of file 0.ctype.cpp.

◆ test_scan_not()

template<class charT >
void test_scan_not ( charT *  ,
const char *  cname 
)

Definition at line 326 of file 0.ctype.cpp.

◆ test_tolower()

template<class charT >
void test_tolower ( charT *  ,
const char *  cname 
)

Definition at line 359 of file 0.ctype.cpp.

◆ test_toupper()

template<class charT >
void test_toupper ( charT *  ,
const char *  cname 
)

Definition at line 340 of file 0.ctype.cpp.

◆ test_widen()

template<class charT >
void test_widen ( charT *  ,
const char *  cname 
)

Definition at line 378 of file 0.ctype.cpp.

Variable Documentation

◆ cntrl

const char cntrl[]
extern
Initial value:
= {
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f"
}

0.ctype.cpp - test exercising the UserCtype helper class template

$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 2006 Rogue Wave Software.

◆ digits

const char digits[] = "0123456789"
extern

18.limits.traps.stdcxx-624.cpp - regression test for STDCXX-624

$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.

Definition at line 33 of file 18.limits.traps.stdcxx-624.cpp.

◆ graph

const char graph[] = "!\"#$%&\\‍()*+,-./0123456789:;<=>?@[]^_`{|}~"
extern

◆ lower

const char lower[] = "abcdefghijklmnopqrstuvwxyz"
extern

◆ n_cntrl

const std::size_t n_cntrl = sizeof cntrl - 1
extern

◆ n_digits

const std::size_t n_digits = sizeof digits - 1
extern

◆ n_graph

const std::size_t n_graph = sizeof graph - 1
extern

◆ n_lower

const std::size_t n_lower = sizeof lower - 1
extern

◆ n_print

const std::size_t n_print = sizeof print - 1
extern

◆ n_punct

const std::size_t n_punct = sizeof punct - 1
extern

◆ n_spaces

const std::size_t n_spaces = sizeof spaces - 1
extern

◆ n_upper

const std::size_t n_upper = sizeof upper - 1
extern

◆ n_xdigits

const std::size_t n_xdigits = sizeof xdigits - 1
extern

◆ opt_id

unsigned opt_id

Definition at line 418 of file 0.ctype.cpp.

◆ opt_is

unsigned opt_is

Definition at line 420 of file 0.ctype.cpp.

◆ opt_narrow

unsigned opt_narrow

Definition at line 428 of file 0.ctype.cpp.

◆ opt_scan_is

unsigned opt_scan_is

Definition at line 421 of file 0.ctype.cpp.

◆ opt_scan_not

unsigned opt_scan_not

Definition at line 422 of file 0.ctype.cpp.

◆ opt_tolower

unsigned opt_tolower

Definition at line 425 of file 0.ctype.cpp.

◆ opt_toupper

unsigned opt_toupper

Definition at line 424 of file 0.ctype.cpp.

◆ opt_widen

unsigned opt_widen

Definition at line 427 of file 0.ctype.cpp.

◆ print

const char print[]
extern
Initial value:
= {
"!\"#$%&\\()*+,-./0123456789:;<=>?@[]^_`{|}~"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
}

◆ punct

const char punct[] = "!#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~"
extern

◆ spaces

const char spaces[] = " \t\v\f\r\n"
extern

◆ upper

const char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
extern

◆ xdigits

const char xdigits[] = "0123456789ABCDEFabcdef"
extern