ReactOS
0.4.16-dev-1104-ge0ef51b
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
binsert_test.cpp
Go to the documentation of this file.
1
#include <vector>
2
#include <algorithm>
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
BinsertTest
:
public
CPPUNIT_NS::TestCase
14
{
15
CPPUNIT_TEST_SUITE
(
BinsertTest
);
16
CPPUNIT_TEST
(
binsert1
);
17
CPPUNIT_TEST
(
binsert2
);
18
CPPUNIT_TEST_SUITE_END
();
19
20
protected
:
21
void
binsert1
();
22
void
binsert2
();
23
};
24
25
CPPUNIT_TEST_SUITE_REGISTRATION
(
BinsertTest
);
26
27
//
28
// tests implementation
29
//
30
void
BinsertTest::binsert1
()
31
{
32
const
char
*
array
[] = {
"laurie"
,
"jennifer"
,
"leisa"
};
33
vector<const char*>
names
;
34
back_insert_iterator<vector<const char*>
> bit(
names
);
35
bit =
copy
(
array
,
array
+ 3, bit);
36
37
CPPUNIT_ASSERT
(!
strcmp
(
names
[0],
array
[0]));
38
CPPUNIT_ASSERT
(!
strcmp
(
names
[1],
array
[1]));
39
CPPUNIT_ASSERT
(!
strcmp
(
names
[2],
array
[2]));
40
41
copy
(
array
,
array
+ 3, bit);
42
CPPUNIT_ASSERT
(!
strcmp
(
names
[3],
array
[0]));
43
CPPUNIT_ASSERT
(!
strcmp
(
names
[4],
array
[1]));
44
CPPUNIT_ASSERT
(!
strcmp
(
names
[5],
array
[2]));
45
}
46
void
BinsertTest::binsert2
()
47
{
48
const
char
*
array
[] = {
"laurie"
,
"jennifer"
,
"leisa"
};
49
vector<const char*>
names
;
50
copy
(
array
,
array
+ 3,
back_inserter
(
names
));
51
CPPUNIT_ASSERT
(!
strcmp
(
names
[0],
array
[0]));
52
CPPUNIT_ASSERT
(!
strcmp
(
names
[1],
array
[1]));
53
CPPUNIT_ASSERT
(!
strcmp
(
names
[2],
array
[2]));
54
}
back_inserter
back_insert_iterator< _Container > _STLP_CALL back_inserter(_Container &__x)
Definition:
_iterator.h:187
strcmp
int strcmp(const char *String1, const char *String2)
Definition:
utclib.c:469
copy
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition:
copy.c:51
BinsertTest
Definition:
binsert_test.cpp:14
BinsertTest::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(BinsertTest)
BinsertTest::binsert1
void binsert1()
Definition:
binsert_test.cpp:30
BinsertTest::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
BinsertTest::CPPUNIT_TEST
CPPUNIT_TEST(binsert1)
BinsertTest::binsert2
void binsert2()
Definition:
binsert_test.cpp:46
BinsertTest::CPPUNIT_TEST
CPPUNIT_TEST(binsert2)
back_insert_iterator
Definition:
_iterator.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
names
GLuint GLuint * names
Definition:
glext.h:11545
std
Definition:
features.h:417
array
Definition:
wbemprox_private.h:130
sdk
lib
3rdparty
stlport
test
unit
binsert_test.cpp
Generated on Fri May 9 2025 06:13:52 for ReactOS by
1.9.6