ReactOS
0.4.16-dev-927-g467dec4
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
test_errno.cpp
Go to the documentation of this file.
1
//We are including stdlib.h and stddef.h first because under MSVC
2
//those headers contains a errno macro definition without the underlying value
3
//definition.
4
#include <stdlib.h>
5
#include <stddef.h>
6
7
#include <errno.h>
8
#include <errno.h>
// not typo, check errno def/undef/redef
9
10
#ifndef _STLP_WCE
11
12
#include "
cppunit/cppunit_proxy.h
"
13
14
//
15
// TestCase class
16
//
17
class
ErrnoTest
:
public
CPPUNIT_NS::TestCase
18
{
19
CPPUNIT_TEST_SUITE
(
ErrnoTest
);
20
CPPUNIT_TEST
(
check
);
21
CPPUNIT_TEST_SUITE_END
();
22
23
protected
:
24
void
check
();
25
};
26
27
CPPUNIT_TEST_SUITE_REGISTRATION
(
ErrnoTest
);
28
29
void
ErrnoTest::check
()
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
36
CPPUNIT_ASSERT
(
errno
==
ERANGE
);
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
}
56
#endif
// _STLP_WCE
ERANGE
#define ERANGE
Definition:
acclib.h:92
ErrnoTest
Definition:
test_errno.cpp:18
ErrnoTest::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
ErrnoTest::check
void check()
Definition:
test_errno.cpp:29
ErrnoTest::CPPUNIT_TEST
CPPUNIT_TEST(check)
ErrnoTest::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(ErrnoTest)
CPPUNIT_TEST_SUITE_REGISTRATION
#define CPPUNIT_TEST_SUITE_REGISTRATION(X)
Definition:
cppunit_mini.h:193
CPPUNIT_ASSERT
#define CPPUNIT_ASSERT(X)
Definition:
cppunit_mini.h:200
cppunit_proxy.h
errno
#define errno
Definition:
errno.h:18
sdk
lib
3rdparty
stlport
test
unit
test_errno.cpp
Generated on Sun Mar 30 2025 06:13:52 for ReactOS by
1.9.6