forked from VSoftTechnologies/DUnitX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDUnitX.AutoDetect.Console.pas
67 lines (62 loc) · 3.18 KB
/
DUnitX.AutoDetect.Console.pas
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
{***************************************************************************}
{ }
{ DUnitX }
{ }
{ Copyright (C) 2012 Vincent Parrett }
{ }
{ http://www.finalbuilder.com }
{ }
{ }
{***************************************************************************}
{ }
{ Licensed under the Apache License, Version 2.0 (the "License"); }
{ you may not use this file except in compliance with the License. }
{ You may obtain a copy of the License at }
{ }
{ http://www.apache.org/licenses/LICENSE-2.0 }
{ }
{ Unless required by applicable law or agreed to in writing, software }
{ distributed under the License is distributed on an "AS IS" BASIS, }
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
{ See the License for the specific language governing permissions and }
{ limitations under the License. }
{ }
{***************************************************************************}
/// <summary>
/// Using this unit will auto detect the platform you are compiling for and
/// register the correct console unit.
/// </summary>
/// <remarks>
/// <para>
/// It is really just adding the correct unit DUnitX."PlatformName".Console
/// Unit to the project via a compiler define.
/// </para>
/// <para>
/// This cleans up the DPR uses by removing the need for {$IFDEF}
/// statements in the project uses clause. If a {$IFDEF} is in the project
/// uses clause and you add a new file Delphi does not know which area to
/// put it in and has to guess.
/// </para>
/// <para>
/// In versions prior to XE3 it would just remove {$IFDEF} statements
/// completely from your code.
/// <see href="http://qc.embarcadero.com/wc/qcmain.aspx?d=6294'" />
/// </para>
/// </remarks>
/// <seealso cref="DUnitX.Windows.Console" />
/// <seealso cref="DUnitX.MacOS.Console" />
/// <seealso cref="DUnitX.Loggers.Console" />
unit DUnitX.AutoDetect.Console;
interface
uses
{$IFDEF MSWINDOWS}
DUnitX.Windows.Console;
{$ELSE}
// Simplification as MacOS console supports Ansi, and other terminals
// on platforms other than windows typically support some form of
// ANSI colors.
DUnitX.MacOS.Console;
{$ENDIF}
implementation
end.