ReactOS 0.4.15-dev-7924-g5949c20
ErrnoTest Class Reference
Inheritance diagram for ErrnoTest:
Collaboration diagram for ErrnoTest:

Protected Member Functions

void check ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (ErrnoTest)
 
 CPPUNIT_TEST (check)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 17 of file test_errno.cpp.

Member Function Documentation

◆ check()

void ErrnoTest::check ( )
protected

Definition at line 29 of file test_errno.cpp.

30{
31 //We are using ERANGE as it is part of the C++ ISO (see Table 26 in section 19.3)
32 //Using ERANGE improve the test as it means that the native errno.h file has really
33 //been included.
34 errno = ERANGE;
35
37 errno = 0;
38
39/* Note: in common, you can't write ::errno or std::errno,
40 * due to errno in most cases is just a macro, that frequently
41 * (in MT environment errno is a per-thread value) expand to something like
42 * (*__errno_location()). I don't know way how masquerade such
43 * things: name of macro can't include ::.
44 *
45 * - ptr, 2005-03-30
46 */
47# if 0
48 if ( ::errno != 0 ) {
49 return 1;
50 }
51 if ( std::errno != 0 ) {
52 return 1;
53 }
54# endif
55}
#define ERANGE
Definition: acclib.h:92
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
#define errno
Definition: errno.h:18

◆ CPPUNIT_TEST()

ErrnoTest::CPPUNIT_TEST ( check  )
private

◆ CPPUNIT_TEST_SUITE()

ErrnoTest::CPPUNIT_TEST_SUITE ( ErrnoTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

ErrnoTest::CPPUNIT_TEST_SUITE_END ( )
private

The documentation for this class was generated from the following file: