-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
111 lines (89 loc) · 2.14 KB
/
test.cpp
File metadata and controls
111 lines (89 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
//#include "xData\xData.h"
#include "xDataTest.h"
#include <stdlib.h>
#include <time.h>
#include <crtdbg.h>
struct A{
A()
{
Sleep(100);
};
};
struct B{
B()
{
Sleep(100);
};
};
struct C{
C()
{
Sleep(100);
};
};
class __declspec(novtable) D:public A, public B, public C{
public:
D() : A(), B(), C()
{
Sleep(100);
};
};
int main(int /*argc*/, char* /*argv[]*/)
{
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_DEBUG );
_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG);
_CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_DEBUG);
_CrtMemState s1, s2, s3;
_CrtMemCheckpoint( &s1 );
xDataTest *o = new xDataTest;
/************************************************************/
/**************** íà÷àëî òåñòîâîé çîíû **********************/
//for (int i=0;i<10000;i++)
//{
//start();
if (!o->ContainerTest1()) return 0;
if (!o->EqualTest()) return 0;
if (!o->InitTest()) return 0;
if (!o->ConvertionTest()) return 0;
if (!o->ObjectDescriptionTest()) return 0;
if (!o->StringTest1()) return 0;
if (!o->NameTest1()) return 0;
if (!o->ContainerTest4()) return 0;
if (!o->PointerTest1()) return 0;
if (!o->ContainerTest2()) return 0;
if (!o->ContainerTest3()) return 0;
if (!o->ContainerTest5()) return 0;
if (!o->ReflectorTest()) return 0;
if (!o->StoringTest()) return 0;
if (!o->XmlTest()) return 0;
//end();
//Sleep(10);
//}
//if (!o->ConstructorsTest()) return 0;
//if (!o->SyncronizeTest()) return 0;
//if (!o->StoreAndRestoreTest()) return 0;
//if (!o->ExceptionTest1()) return 0;
if (!o->CompareTest()) return 0;
delete o;
/**************** êîíåö òåñòîâîé çîíû ***********************/
/************************************************************/
_CrtMemCheckpoint( &s2 );
_CrtDumpMemoryLeaks();
if ( _CrtMemDifference( &s3, &s1, &s2 ) )
_CrtMemDumpStatistics( &s3 );
//xcpData d1((unsigned __int64)3, "abc");
//int a= int(true);
//if (a==3)
// Beep(440,10);
//xcpData d2(d1);
//int i = sizeof(d2);
//d1.EnterCS();
//d1.LeaveCS();
//d1 =d2;
// xcData d3;
// bool r = d.IsEmpty();
}