Go to the source code of this file.
◆ TEST() [1/4]
Definition at line 65 of file allocatorstest.cpp.
65 {
66#if RAPIDJSON_64BIT == 1
73 }
74#else
81 }
82#endif
83}
#define EXPECT_EQ(val1, val2)
#define RAPIDJSON_ALIGN(x)
Data alignment of the machine.
#define RAPIDJSON_UINT64_C2(high32, low32)
Construct a 64-bit literal by a pair of 32-bit integer.
unsigned __int64 uint64_t
◆ TEST() [2/4]
Definition at line 50 of file allocatorstest.cpp.
50 {
53}
void TestAllocator(Allocator &a)
C-runtime library allocator.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
◆ TEST() [3/4]
Definition at line 85 of file allocatorstest.cpp.
85 {
87 void* p =
a.Malloc(100);
88 void* q =
a.Realloc(p, 100, 200);
90
91
92 for (size_t j = 1; j < 32; j++) {
96 for (size_t i = 1; i < 1024; i++) {
97 q =
a.Realloc(p, i, i + 1);
99 p = q;
100 }
101 }
102}
Default memory allocator used by the parser and DOM.
◆ TEST() [4/4]
Definition at line 55 of file allocatorstest.cpp.
55 {
58
59 for (size_t i = 1; i < 1000; i++) {
62 }
63}
#define EXPECT_TRUE(condition)
#define EXPECT_LE(val1, val2)
◆ TestAllocator()
Definition at line 22 of file allocatorstest.cpp.
22 {
24
27 for (size_t i = 0; i < 100; i++)
29
30
33 for (size_t i = 0; i < 100; i++)
35 for (size_t i = 100; i < 200; i++)
37
38
41 for (size_t i = 0; i < 150; i++)
43
44 Allocator::Free(r);
45
46
48}