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
queue_test.cpp
Go to the documentation of this file.
1
#include <vector>
2
#include <algorithm>
3
#include <list>
4
#include <deque>
5
#include <queue>
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
QueueTest
:
public
CPPUNIT_NS::TestCase
17
{
18
CPPUNIT_TEST_SUITE
(
QueueTest
);
19
CPPUNIT_TEST
(
pqueue1
);
20
CPPUNIT_TEST
(
queue1
);
21
CPPUNIT_TEST_SUITE_END
();
22
23
protected
:
24
void
pqueue1
();
25
void
queue1
();
26
};
27
28
CPPUNIT_TEST_SUITE_REGISTRATION
(
QueueTest
);
29
30
//
31
// tests implementation
32
//
33
void
QueueTest::pqueue1
()
34
{
35
priority_queue<int, deque<int>
,
less<int>
>
q
;
36
q
.push(42);
37
q
.push(101);
38
q
.push(69);
39
40
CPPUNIT_ASSERT
(
q
.top()==101 );
41
q
.pop();
42
CPPUNIT_ASSERT
(
q
.top()==69 );
43
q
.pop();
44
CPPUNIT_ASSERT
(
q
.top()==42 );
45
q
.pop();
46
47
CPPUNIT_ASSERT
(
q
.empty());
48
}
49
void
QueueTest::queue1
()
50
{
51
queue<int, list<int>
>
q
;
52
q
.push(42);
53
q
.push(101);
54
q
.push(69);
55
56
CPPUNIT_ASSERT
(
q
.front()==42 );
57
q
.pop();
58
CPPUNIT_ASSERT
(
q
.front()==101 );
59
q
.pop();
60
CPPUNIT_ASSERT
(
q
.front()==69 );
61
q
.pop();
62
63
CPPUNIT_ASSERT
(
q
.empty());
64
}
QueueTest
Definition:
queue_test.cpp:17
QueueTest::queue1
void queue1()
Definition:
queue_test.cpp:49
QueueTest::pqueue1
void pqueue1()
Definition:
queue_test.cpp:33
QueueTest::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(QueueTest)
QueueTest::CPPUNIT_TEST
CPPUNIT_TEST(queue1)
QueueTest::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
QueueTest::CPPUNIT_TEST
CPPUNIT_TEST(pqueue1)
priority_queue
Definition:
_queue.h:150
queue
Definition:
_queue.h:67
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
q
GLdouble GLdouble GLdouble GLdouble q
Definition:
gl.h:2063
std
Definition:
features.h:417
less
Definition:
_function_base.h:78
sdk
lib
3rdparty
stlport
test
unit
queue_test.cpp
Generated on Sun Mar 30 2025 06:13:52 for ReactOS by
1.9.6