Debian Codegraph @

tests/code/testcases/testcastleinternaltools.pas

raw
1 {
2 Copyright 2024-2024 Michalis Kamburelis.
3
4 This file is part of "Castle Game Engine".
5
6 "Castle Game Engine" is free software; see the file COPYING.txt,
7 included in this distribution, for details about the copyright.
8
9 "Castle Game Engine" is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 ----------------------------------------------------------------------------
14 }
15
16 { Test CastleInternalTools unit. }
17 unit TestCastleInternalTools;
18
19 interface
20
21 uses
22 Classes, SysUtils, CastleTester;
23
24 type
25 TTestCastleInternalTools = class(TCastleTestCase)
26 published
27 procedure TestStringToDependency;
28 end;
29
30 implementation
31
32 uses CastleInternalTools;
33
34 procedure TTestCastleInternalTools.TestStringToDependency;
35 var
36 Deps: TProjectDependencies;
37 begin
38 AssertTrue(depPng = StringToDependency('png'));
39 Deps := TProjectDependencies.Create;
40 try
41 Deps.Dependencies := [depPng];
42 Deps.CloseDependencies;
43 AssertTrue([depPng, depZlib] = Deps.Dependencies);
44 finally FreeAndNil(Deps) end;
45 end;
46
47 initialization
48 RegisterTest(TTestCastleInternalTools);
49 end.