Debian Codegraph @

tests/code/testcases/testcastleinternalautogenerated.pas

raw
1 // -*- compile-command: "./test_single_testcase.sh TTestCastleInternalAutoGenerated" -*-
2 {
3 Copyright 2021-2022 Michalis Kamburelis.
4
5 This file is part of "Castle Game Engine".
6
7 "Castle Game Engine" is free software; see the file COPYING.txt,
8 included in this distribution, for details about the copyright.
9
10 "Castle Game Engine" is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 ----------------------------------------------------------------------------
15 }
16
17 { Test CastleInternalAutoGenerated. }
18 unit TestCastleInternalAutoGenerated;
19
20 interface
21
22 uses CastleTester;
23
24 type
25 TTestCastleInternalAutoGenerated = class(TCastleTestCase)
26 published
27 procedure TestStrToPlatforms;
28 end;
29
30 implementation
31
32 uses CastleUtils, CastleInternalAutoGenerated;
33
34 procedure TTestCastleInternalAutoGenerated.TestStrToPlatforms;
35 begin
36 Assert(StrToPlatforms('') = []);
37 Assert(StrToPlatforms('all') = AllPlatforms);
38 Assert(StrToPlatforms('Desktop') = [cpDesktop]);
39 Assert(StrToPlatforms('Android;iOS;Nintendo Switch') = [cpAndroid, cpIOS, cpNintendoSwitch]);
40 Assert(StrToPlatforms('ANDROID;IOS;NINTENDO SWITCH') = [cpAndroid, cpIOS, cpNintendoSwitch]); // case ignored
41 end;
42
43 initialization
44 RegisterTest(TTestCastleInternalAutoGenerated);
45 end.