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
stack_test.cpp
Go to the documentation of this file.
1
#include <algorithm>
2
#include <list>
3
#include <queue>
4
#include <deque>
5
#include <stack>
6
7
#include "
cppunit/cppunit_proxy.h
"
8
9
#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
10
using namespace
std
;
11
#endif
12
13
//
14
// TestCase class
15
//
16
class
StackTest
:
public
CPPUNIT_NS::TestCase
17
{
18
CPPUNIT_TEST_SUITE
(
StackTest
);
19
CPPUNIT_TEST
(
stack1
);
20
CPPUNIT_TEST
(
stack2
);
21
CPPUNIT_TEST_SUITE_END
();
22
23
protected
:
24
void
stack1
();
25
void
stack2
();
26
};
27
28
CPPUNIT_TEST_SUITE_REGISTRATION
(
StackTest
);
29
30
//
31
// tests implementation
32
//
33
void
StackTest::stack1
()
34
{
35
stack<int, deque<int>
>
s
;
36
s
.push(42);
37
s
.push(101);
38
s
.push(69);
39
CPPUNIT_ASSERT
(
s
.top()==69);
40
s
.pop();
41
CPPUNIT_ASSERT
(
s
.top()==101);
42
s
.pop();
43
CPPUNIT_ASSERT
(
s
.top()==42);
44
s
.pop();
45
CPPUNIT_ASSERT
(
s
.empty());
46
}
47
void
StackTest::stack2
()
48
{
49
stack<int, list<int>
>
s
;
50
s
.push(42);
51
s
.push(101);
52
s
.push(69);
53
CPPUNIT_ASSERT
(
s
.top()==69);
54
s
.pop();
55
CPPUNIT_ASSERT
(
s
.top()==101);
56
s
.pop();
57
CPPUNIT_ASSERT
(
s
.top()==42);
58
s
.pop();
59
CPPUNIT_ASSERT
(
s
.empty());
60
}
StackTest
Definition:
stack_test.cpp:17
StackTest::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(StackTest)
StackTest::CPPUNIT_TEST
CPPUNIT_TEST(stack2)
StackTest::stack1
void stack1()
Definition:
stack_test.cpp:33
StackTest::stack2
void stack2()
Definition:
stack_test.cpp:47
StackTest::CPPUNIT_TEST
CPPUNIT_TEST(stack1)
StackTest::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
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
s
GLdouble s
Definition:
gl.h:2039
std
Definition:
features.h:417
stack
Definition:
format.c:80
sdk
lib
3rdparty
stlport
test
unit
stack_test.cpp
Generated on Sun Mar 30 2025 06:13:52 for ReactOS by
1.9.6