ReactOS
0.4.16-dev-983-g23ad936
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
bnegate_test.cpp
Go to the documentation of this file.
1
#include <algorithm>
2
#include <functional>
3
4
#include "
cppunit/cppunit_proxy.h
"
5
6
#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
7
using namespace
std
;
8
#endif
9
10
//
11
// TestCase class
12
//
13
class
BnegateTest
:
public
CPPUNIT_NS::TestCase
14
{
15
CPPUNIT_TEST_SUITE
(
BnegateTest
);
16
CPPUNIT_TEST
(
bnegate1
);
17
CPPUNIT_TEST
(
bnegate2
);
18
CPPUNIT_TEST_SUITE_END
();
19
20
protected
:
21
void
bnegate1
();
22
void
bnegate2
();
23
};
24
25
CPPUNIT_TEST_SUITE_REGISTRATION
(
BnegateTest
);
26
27
//
28
// tests implementation
29
//
30
void
BnegateTest::bnegate1
()
31
{
32
int
array
[4] = { 4, 9, 7, 1 };
33
34
sort
(
array
,
array
+ 4,
binary_negate
<
greater<int>
>(
greater<int>
()));
35
CPPUNIT_ASSERT
(
array
[0]==1);
36
CPPUNIT_ASSERT
(
array
[1]==4);
37
CPPUNIT_ASSERT
(
array
[2]==7);
38
CPPUNIT_ASSERT
(
array
[3]==9);
39
}
40
void
BnegateTest::bnegate2
()
41
{
42
int
array
[4] = { 4, 9, 7, 1 };
43
sort
(
array
,
array
+ 4,
not2
(
greater<int>
()));
44
CPPUNIT_ASSERT
(
array
[0]==1);
45
CPPUNIT_ASSERT
(
array
[1]==4);
46
CPPUNIT_ASSERT
(
array
[2]==7);
47
CPPUNIT_ASSERT
(
array
[3]==9);
48
}
sort
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition:
_algo.c:993
not2
binary_negate< _Predicate > not2(const _Predicate &__pred)
Definition:
_function.h:183
BnegateTest
Definition:
bnegate_test.cpp:14
BnegateTest::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
BnegateTest::bnegate2
void bnegate2()
Definition:
bnegate_test.cpp:40
BnegateTest::CPPUNIT_TEST
CPPUNIT_TEST(bnegate1)
BnegateTest::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(BnegateTest)
BnegateTest::bnegate1
void bnegate1()
Definition:
bnegate_test.cpp:30
BnegateTest::CPPUNIT_TEST
CPPUNIT_TEST(bnegate2)
binary_negate
Definition:
_function.h:162
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
std
Definition:
features.h:417
array
Definition:
wbemprox_private.h:130
greater
Definition:
_function.h:49
sdk
lib
3rdparty
stlport
test
unit
bnegate_test.cpp
Generated on Thu Apr 17 2025 06:15:19 for ReactOS by
1.9.6