forked from matortheeternal/xedit-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
XEditLibTests.dpr
120 lines (110 loc) · 2.95 KB
/
XEditLibTests.dpr
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
112
113
114
115
116
117
118
119
120
program XEditLibTests;
{$APPTYPE CONSOLE}
uses
SysUtils,
{$IFDEF USE_DLL}
txImports in 'tests\txImports.pas',
{$ENDIF }
{$IFNDEF USE_DLL}
xeTypes in 'src\xeTypes.pas',
xeMessages in 'src\xeMessages.pas',
xeConfiguration in 'src\xeConfiguration.pas',
xeMeta in 'src\xeMeta.pas',
xeSetup in 'src\xeSetup.pas',
xeFiles in 'src\xeFiles.pas',
xeResources in 'src\xeResources.pas',
xeMasters in 'src\xeMasters.pas',
xeElements in 'src\xeElements.pas',
xeElementValues in 'src\xeElementValues.pas',
xeErrors in 'src\xeErrors.pas',
xeRecords in 'src\xeRecords.pas',
xeSerialization in 'src\xeSerialization.pas',
xeFilter in 'src\xeFilter.pas',
wbImplementation in 'lib\xedit\wbImplementation.pas',
wbInterface in 'lib\xedit\wbInterface.pas',
wbBSA in 'lib\xedit\wbBSA.pas',
wbSort in 'lib\xedit\wbSort.pas',
wbDefinitionsFNV in 'lib\xedit\wbDefinitionsFNV.pas',
wbDefinitionsFO3 in 'lib\xedit\wbDefinitionsFO3.pas',
wbDefinitionsFO4 in 'lib\xedit\wbDefinitionsFO4.pas',
wbDefinitionsTES3 in 'lib\xedit\wbDefinitionsTES3.pas',
wbDefinitionsTES4 in 'lib\xedit\wbDefinitionsTES4.pas',
wbDefinitionsTES5 in 'lib\xedit\wbDefinitionsTES5.pas',
wbHelpers in 'lib\xedit\wbHelpers.pas',
wbLocalization in 'lib\xedit\wbLocalization.pas',
wbStreams in 'lib\xedit\wbStreams.pas',
{$ENDIF }
txMeta in 'tests\txMeta.pas',
txMessages in 'tests\txMessages.pas',
txSetup in 'tests\txSetup.pas',
txFiles in 'tests\txFiles.pas',
txResources in 'tests\txResources.pas',
txMasters in 'tests\txMasters.pas',
txElements in 'tests\txElements.pas',
txElementValues in 'tests\txElementValues.pas',
txSerialization in 'tests\txSerialization.pas',
txRecords in 'tests\txRecords.pas',
txErrors in 'tests\txErrors.pas',
txFilter in 'tests\txFilter.pas',
Argo in 'lib\Argo\Argo.pas',
ArgoTypes in 'lib\Argo\ArgoTypes.pas',
Mahogany in 'lib\mahogany\Mahogany.pas';
{$R XEditLib.RES}
{$MAXSTACKSIZE 2097152}
const
IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020;
procedure BuildXETests;
begin
{$IFDEF SKYRIM}
BuildSetupTests;
BuildMetaTests;
BuildMessageTests;
BuildFileHandlingTests;
BuildResourceTests;
BuildMasterHandlingTests;
BuildElementHandlingTests;
BuildElementValueTests;
BuildRecordHandlingTests;
BuildSerializationTests;
BuildPluginErrorTests;
BuildFilterTests;
BuildFinalTests;
{$ENDIF}
{$IFDEF SSE}
BuildSetupTests;
BuildFinalTests;
{$ENDIF}
{$IFDEF FO4}
BuildSetupTests;
BuildFinalTests;
{$ENDIF}
end;
procedure RunXETests;
var
LogToConsole: TMessageProc;
begin
// log messages to the console
LogToConsole := procedure(msg: String)
begin
WriteLn(msg);
end;
// init xedit
InitXEdit;
WriteMessages;
WriteLn(' ');
// run the tests
RunTests(LogToConsole);
// report testing results
WriteLn(' ');
ReportResults(LogToConsole);
end;
begin
try
BuildXETests;
RunXETests;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
ReadLn;
end.