OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:CtorDtorCounter
(Results
1 - 4
of
4
) sorted by null
/external/astl/tests/
common.h
70
class
CtorDtorCounter
{
77
CtorDtorCounter
() {++mCtorCount;}
78
CtorDtorCounter
(const
CtorDtorCounter
& nc) {++mCopyCtorCount;}
79
CtorDtorCounter
& operator=(const
CtorDtorCounter
& nc) {++mAssignCount; return *this;}
80
~
CtorDtorCounter
() {++mDtorCount;}
83
std::fprintf(stderr, "
CtorDtorCounter
: %d %d %d %d\n",
90
size_t
CtorDtorCounter
::mCtorCount;
91
size_t
CtorDtorCounter
::mCopyCtorCount
[
all
...]
test_memory.cpp
58
const
CtorDtorCounter
kSrc[10];
59
const
CtorDtorCounter
*begin = kSrc;
60
const
CtorDtorCounter
*end = begin + kLen;
61
CtorDtorCounter
*dest = new
CtorDtorCounter
[kLen];
62
CtorDtorCounter
*const kDest = dest;
63
CtorDtorCounter
*res;
65
CtorDtorCounter
::reset();
68
EXPECT_TRUE(kLen ==
CtorDtorCounter
::mCopyCtorCount);
69
EXPECT_TRUE(0 ==
CtorDtorCounter
::mCtorCount)
[
all
...]
test_uninitialized.cpp
78
CtorDtorCounter
::reset();
80
CtorDtorCounter
src[kSize];
81
CtorDtorCounter
*dest = static_cast<
CtorDtorCounter
*>(
82
malloc(kSize * sizeof(
CtorDtorCounter
)));
84
EXPECT_TRUE(
CtorDtorCounter
::mCtorCount == kSize);
85
EXPECT_TRUE(
CtorDtorCounter
::mCopyCtorCount == 0);
86
EXPECT_TRUE(
CtorDtorCounter
::mDtorCount == 0);
88
CtorDtorCounter
::reset();
92
EXPECT_TRUE(
CtorDtorCounter
::mCtorCount == 0)
[
all
...]
test_vector.cpp
250
vector<
CtorDtorCounter
> vec1;
251
CtorDtorCounter
c;
319
CtorDtorCounter
instance;
320
vector<
CtorDtorCounter
> vec2(10, instance);
322
CtorDtorCounter
::reset();
328
EXPECT_TRUE(
CtorDtorCounter
::mDtorCount == 10);
366
vector<
CtorDtorCounter
> vec;
367
CtorDtorCounter
::reset();
369
EXPECT_TRUE(
CtorDtorCounter
::mCtorCount == 1); // default arg.
370
EXPECT_TRUE(
CtorDtorCounter
::mCopyCtorCount == 10); // copied 10 times
[
all
...]
Completed in 545 milliseconds