-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAcrylicTester.dpr
103 lines (82 loc) · 3.77 KB
/
AcrylicTester.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
// --------------------------------------------------------------------------
//
// --------------------------------------------------------------------------
{$APPTYPE CONSOLE}
// --------------------------------------------------------------------------
//
// --------------------------------------------------------------------------
program
AcrylicTester;
// --------------------------------------------------------------------------
//
// --------------------------------------------------------------------------
uses
SysUtils,
Classes,
IniFiles,
AbstractUnitTest in 'AbstractUnitTest.pas',
AcrylicVersionInfo in 'AcrylicVersionInfo.pas',
AddressCache in 'AddressCache.pas',
CommonUtils in 'CommonUtils.pas',
CommunicationChannels in 'CommunicationChannels.pas',
Configuration in 'Configuration.pas',
ConsoleTracerAgent in 'ConsoleTracerAgent.pas',
DnsForwarder in 'DnsForwarder.pas',
DnsOverHttpsCache in 'DnsOverHttpsCache.pas',
DnsProtocol in 'DnsProtocol.pas',
DnsResolver in 'DnsResolver.pas',
Environment in 'Environment.pas',
FileIO in 'FileIO.pas',
FileStreamLineEx in 'FileStreamLineEx.pas',
FileTracerAgent in 'FileTracerAgent.pas',
HitLogger in 'HitLogger.pas',
HostsCache in 'HostsCache.pas',
HostsCacheBinaryTrees in 'HostsCacheBinaryTrees.pas',
IPUtils in 'IPUtils.pas',
MD5 in 'MD5.pas',
MemoryManager in 'MemoryManager.pas',
MemoryStore in 'MemoryStore.pas',
PatternMatching in 'PatternMatching.pas',
PerlRegEx in 'PerlRegEx.pas',
SessionCache in 'SessionCache.pas',
Tracer in 'Tracer.pas',
WinHttp in 'WinHttp.pas',
WinSock in 'WinSock.pas';
// --------------------------------------------------------------------------
//
// --------------------------------------------------------------------------
var
AllTestsSucceeded: Boolean;
// --------------------------------------------------------------------------
//
// --------------------------------------------------------------------------
{$I MD5UnitTest.pas }
{$I CommunicationChannelsUnitTest.pas }
{$I DnsOverHttpsCacheUnitTest.pas }
{$I SessionCacheUnitTest.pas }
{$I AddressCacheUnitTest.pas }
{$I HostsCacheUnitTest.pas }
{$I RegularExpressionUnitTest.pas }
// --------------------------------------------------------------------------
//
// --------------------------------------------------------------------------
begin
DecimalSeparator := '.';
WriteLn('==============================================================================');
WriteLn('Acrylic DNS Proxy Tester');
WriteLn('==============================================================================');
TConfiguration.Initialize; TTracer.Initialize; TTracer.SetTracerAgent(TConsoleTracerAgent.Create);
if TTracer.IsEnabled then TTracer.Trace(TracePriorityInfo, 'Acrylic version ' + AcrylicVersionNumber + ' released on ' + AcrylicReleaseDate + '.');
AllTestsSucceeded := False;
if TAbstractUnitTest.ControlTestExecution(TMD5UnitTest.Create) then
if TAbstractUnitTest.ControlTestExecution(TCommunicationChannelsUnitTest.Create) then
if TAbstractUnitTest.ControlTestExecution(TDnsOverHttpsCacheUnitTest.Create) then
if TAbstractUnitTest.ControlTestExecution(TSessionCacheUnitTest.Create) then
if TAbstractUnitTest.ControlTestExecution(TAddressCacheUnitTest.Create) then
if TAbstractUnitTest.ControlTestExecution(THostsCacheUnitTest.Create) then
if TAbstractUnitTest.ControlTestExecution(TRegularExpressionUnitTest.Create) then
AllTestsSucceeded := True;
if TTracer.IsEnabled then if AllTestsSucceeded then TTracer.Trace(TracePriorityInfo, 'ALL TESTS SUCCEEDED!') else TTracer.Trace(TracePriorityInfo, 'AT LEAST ONE TEST FAILED!');
TTracer.Finalize; TConfiguration.Finalize;
if AllTestsSucceeded then ExitCode := 0 else ExitCode := 1;
end.