Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Enumerations | Functions | Variables
22.locale.num.get.cpp File Reference
#include <cstddef>
#include <cfloat>
#include <climits>
#include <clocale>
#include <cstdio>
#include <cstring>
#include <cerrno>
#include <ios>
#include <limits>
#include <locale>
#include <rw_alg_test.h>
#include <rw_any.h>
#include <rw_cmdopt.h>
#include <rw_driver.h>
#include <rw_char.h>
#include <rw_locale.h>
#include <rw_valcmp.h>
Include dependency graph for 22.locale.num.get.cpp:

Go to the source code of this file.

Data Structures

struct  Ctype< charT >
 
struct  PunctData< charT >
 
struct  Punct< charT, Intl >
 
struct  Ios< charT >
 
struct  Streambuf< charT, Traits >
 
struct  NumGet< charT, InputIterator >
 

Macros

#define boolalpha   std::ios_base::boolalpha
 
#define dec   std::ios_base::dec
 
#define fixed   std::ios_base::fixed
 
#define hex   std::ios_base::hex
 
#define internal   std::ios_base::internal
 
#define left   std::ios_base::left
 
#define oct   std::ios_base::oct
 
#define right   std::ios_base::right
 
#define scientific   std::ios_base::scientific
 
#define showbase   std::ios_base::showbase
 
#define showpoint   std::ios_base::showpoint
 
#define showpos   std::ios_base::showpos
 
#define skipws   std::ios_base::skipws
 
#define unitbuf   std::ios_base::unitbuf
 
#define uppercase   std::ios_base::uppercase
 
#define bin   std::ios_base::bin
 
#define adjustfield   std::ios_base::adjustfield
 
#define basefield   std::ios_base::basefield
 
#define floatfield   std::ios_base::floatfield
 
#define nolock   std::ios_base::nolock
 
#define nolockbuf   std::ios_base::nolockbuf
 
#define Bad   std::ios_base::badbit
 
#define Eof   std::ios_base::eofbit
 
#define Fail   std::ios_base::failbit
 
#define Good   std::ios_base::goodbit
 
#define TEST   do_test
 
#define T   __LINE__, ctype, cname, itype, iname
 
#define TEST_ERRNO(val)
 
#define BASE(n)   ((n) << _RWSTD_IOS_BASEOFF)
 
#define INTSIZE(x)   _RWSTD_STATIC_CAST(int, sizeof (x))
 
#define BASE(n)   ((n) << _RWSTD_IOS_BASEOFF)
 
#define LL(number)   number ## LL
 
#define ULL(number)   number ## ULL
 
#define PVOIDSTR(name)   name, INTSIZE (name - 1)
 
#define VALSTR(x)   floatT (x), #x, int (std::strlen (#x))
 
#define CAT(a, b)   CONCAT (a, b)
 
#define CONCAT(a, b)   a ## b
 
#define TEST(T, tname)
 

Enumerations

enum  IterType { iter_pointer , iter_istreambuf , iter_input }
 
enum  CharType { narrow_char , wide_char , user_char }
 

Functions

template<class charT , class nativeT >
int do_test (int lineno, charT *, const char *cname, IterType itype, const char *iname, nativeT val, const char *str, int eat_expect=-1, int flags=0, int err_expect=-1, const char *grouping="")
 
template<class nativeT >
int do_test (int lineno, CharType ctype, const char *cname, IterType itype, const char *iname, nativeT val, const char *str, int eat_expect=-1, int flags=0, int err_expect=-1, const char *grouping="")
 
template<class numT >
void test_errno (CharType ctype, const char *cname, IterType itype, const char *iname, numT)
 
template<class floatT >
void test_floating_point (CharType ctype, const char *cname, IterType itype, const char *iname, floatT, bool test_locale)
 
void test_dbl_uflow (CharType ctype, const char *cname, IterType itype, const char *iname)
 
int main (int argc, char *argv[])
 

Variables

void * pmax = 0
 

Macro Definition Documentation

◆ adjustfield

#define adjustfield   std::ios_base::adjustfield

Definition at line 491 of file 22.locale.num.get.cpp.

◆ Bad

#define Bad   std::ios_base::badbit

Definition at line 497 of file 22.locale.num.get.cpp.

◆ BASE [1/2]

#define BASE (   n)    ((n) << _RWSTD_IOS_BASEOFF)

◆ BASE [2/2]

#define BASE (   n)    ((n) << _RWSTD_IOS_BASEOFF)

◆ basefield

#define basefield   std::ios_base::basefield

Definition at line 492 of file 22.locale.num.get.cpp.

◆ bin

#define bin   std::ios_base::bin

Definition at line 490 of file 22.locale.num.get.cpp.

◆ boolalpha

#define boolalpha   std::ios_base::boolalpha

Definition at line 475 of file 22.locale.num.get.cpp.

◆ CAT

#define CAT (   a,
  b 
)    CONCAT (a, b)

◆ CONCAT

#define CONCAT (   a,
  b 
)    a ## b

◆ dec

#define dec   std::ios_base::dec

Definition at line 476 of file 22.locale.num.get.cpp.

◆ Eof

#define Eof   std::ios_base::eofbit

Definition at line 498 of file 22.locale.num.get.cpp.

◆ Fail

#define Fail   std::ios_base::failbit

Definition at line 499 of file 22.locale.num.get.cpp.

◆ fixed

#define fixed   std::ios_base::fixed

Definition at line 477 of file 22.locale.num.get.cpp.

◆ floatfield

#define floatfield   std::ios_base::floatfield

Definition at line 493 of file 22.locale.num.get.cpp.

◆ Good

#define Good   std::ios_base::goodbit

Definition at line 500 of file 22.locale.num.get.cpp.

◆ hex

#define hex   std::ios_base::hex

Definition at line 478 of file 22.locale.num.get.cpp.

◆ internal

#define internal   std::ios_base::internal

Definition at line 479 of file 22.locale.num.get.cpp.

◆ INTSIZE

#define INTSIZE (   x)    _RWSTD_STATIC_CAST(int, sizeof (x))

◆ left

#define left   std::ios_base::left

Definition at line 480 of file 22.locale.num.get.cpp.

◆ LL

#define LL (   number)    number ## LL

◆ nolock

#define nolock   std::ios_base::nolock

Definition at line 494 of file 22.locale.num.get.cpp.

◆ nolockbuf

#define nolockbuf   std::ios_base::nolockbuf

Definition at line 495 of file 22.locale.num.get.cpp.

◆ oct

#define oct   std::ios_base::oct

Definition at line 481 of file 22.locale.num.get.cpp.

◆ PVOIDSTR

#define PVOIDSTR (   name)    name, INTSIZE (name - 1)

◆ right

#define right   std::ios_base::right

Definition at line 482 of file 22.locale.num.get.cpp.

◆ scientific

#define scientific   std::ios_base::scientific

Definition at line 483 of file 22.locale.num.get.cpp.

◆ showbase

#define showbase   std::ios_base::showbase

Definition at line 484 of file 22.locale.num.get.cpp.

◆ showpoint

#define showpoint   std::ios_base::showpoint

Definition at line 485 of file 22.locale.num.get.cpp.

◆ showpos

#define showpos   std::ios_base::showpos

Definition at line 486 of file 22.locale.num.get.cpp.

◆ skipws

#define skipws   std::ios_base::skipws

Definition at line 487 of file 22.locale.num.get.cpp.

◆ T

#define T   __LINE__, ctype, cname, itype, iname

Definition at line 505 of file 22.locale.num.get.cpp.

◆ TEST [1/2]

#define TEST   do_test

Definition at line 504 of file 22.locale.num.get.cpp.

◆ TEST [2/2]

#define TEST (   T,
  tname 
)
Value:
if (rw_enabled (tname)) \
test_ ## T (ctype, cname, itype, iname); \
else \
rw_note (0, __FILE__, __LINE__, "%s test disabled", tname)
#define T
_TEST_EXPORT int rw_enabled(const char *name)

Definition at line 504 of file 22.locale.num.get.cpp.

◆ TEST_ERRNO

#define TEST_ERRNO (   val)
Value:
for (i = 0; i != sizeof errnos / sizeof *errnos; ++i) { \
errno = errnos [i]; \
TEST (T, numT (val), _RWSTD_STR (val), \
int (sizeof (_RWSTD_STR (val))) -1, 0, Eof); \
rw_assert (errnos [i] == errno, 0, __LINE__, \
"%d. errno unexpectedly changed from %d to %d", \
i, errnos [i], errno); \
} (void)0
#define i
Definition 17.names.cpp:126
#define val
Definition 17.names.cpp:570
#define Eof
#define _RWSTD_STR(x)
Definition _defs.h:1116

◆ ULL

#define ULL (   number)    number ## ULL

◆ unitbuf

#define unitbuf   std::ios_base::unitbuf

Definition at line 488 of file 22.locale.num.get.cpp.

◆ uppercase

#define uppercase   std::ios_base::uppercase

Definition at line 489 of file 22.locale.num.get.cpp.

◆ VALSTR

#define VALSTR (   x)    floatT (x), #x, int (std::strlen (#x))

Enumeration Type Documentation

◆ CharType

enum CharType
Enumerator
narrow_char 
wide_char 
user_char 

Definition at line 439 of file 22.locale.num.get.cpp.

◆ IterType

enum IterType
Enumerator
iter_pointer 
iter_istreambuf 
iter_input 

Definition at line 246 of file 22.locale.num.get.cpp.

Function Documentation

◆ do_test() [1/2]

template<class charT , class nativeT >
int do_test ( int  lineno,
charT *  ,
const char *  cname,
IterType  itype,
const char *  iname,
nativeT  val,
const char *  str,
int  eat_expect = -1,
int  flags = 0,
int  err_expect = -1,
const char *  grouping = "" 
)

Definition at line 249 of file 22.locale.num.get.cpp.

◆ do_test() [2/2]

template<class nativeT >
int do_test ( int  lineno,
CharType  ctype,
const char *  cname,
IterType  itype,
const char *  iname,
nativeT  val,
const char *  str,
int  eat_expect = -1,
int  flags = 0,
int  err_expect = -1,
const char *  grouping = "" 
)

Definition at line 442 of file 22.locale.num.get.cpp.

◆ main()

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

Definition at line 2999 of file 22.locale.num.get.cpp.

◆ test_dbl_uflow()

void test_dbl_uflow ( CharType  ctype,
const char *  cname,
IterType  itype,
const char *  iname 
)

Definition at line 2612 of file 22.locale.num.get.cpp.

◆ test_errno()

template<class numT >
void test_errno ( CharType  ctype,
const char *  cname,
IterType  itype,
const char *  iname,
numT   
)

Definition at line 509 of file 22.locale.num.get.cpp.

◆ test_floating_point()

template<class floatT >
void test_floating_point ( CharType  ctype,
const char *  cname,
IterType  itype,
const char *  iname,
floatT  ,
bool  test_locale 
)

Definition at line 2143 of file 22.locale.num.get.cpp.

Variable Documentation

◆ pmax

void* pmax = 0

Definition at line 243 of file 22.locale.num.get.cpp.