Skip to content

Commit 8f6300e

Browse files
committed
Add a test running the GNATcheck example
1 parent 3e7e879 commit 8f6300e

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
chop.adb:14:11: PIck_Up does not have casing specified (mixed)
2+
chop.ads:11:18: Stick does not start with subtype prefix T_
3+
phil.adb:21:11: Think_Times does not start with subtype prefix T_
4+
phil.adb:25:11: Meal_Times does not start with subtype prefix T_
5+
phil.adb:31:13: Life_Time does not start with subtype prefix T_
6+
phil.adb:33:05: "Who_Am_I" is not modified, could be declared constant
7+
phil.ads:12:03: violation of restriction "No_Tasking"
8+
phil.ads:12:13: Philosopher does not start with subtype prefix T_
9+
phil.ads:12:26: My_ID does not have casing specified (mixed)
10+
phil.ads:19:08: States does not end with type suffix _Type
11+
phil.ads:19:08: States does not start with subtype prefix T_
12+
random_generic.ads:5:08: Result_Subtype does not end with type suffix _Type
13+
random_generic.ads:5:08: Result_Subtype does not start with subtype prefix T_
14+
room.adb:19:03: violation of restriction "No_Tasking"
15+
room.adb:19:23: anonymous subtype
16+
room.adb:20:03: violation of restriction "No_Tasking"
17+
room.adb:20:23: anonymous subtype
18+
room.adb:21:03: violation of restriction "No_Tasking"
19+
room.adb:21:23: anonymous subtype
20+
room.adb:22:03: violation of restriction "No_Tasking"
21+
room.adb:22:23: anonymous subtype
22+
room.adb:23:03: violation of restriction "No_Tasking"
23+
room.adb:23:23: anonymous subtype
24+
room.adb:25:08: Philosopher_Ptr does not end with access suffix _Access_Type
25+
room.adb:25:08: Philosopher_Ptr does not start with access prefix A_
26+
room.adb:27:11: anonymous array type
27+
room.adb:28:18: anonymous array type
28+
room.adb:29:16: anonymous array type
29+
room.adb:35:05: Blanks does not start with constant prefix C_
30+
room.adb:55:22: aggregate is not a part of a qualified expression
31+
room.adb:56:22: aggregate is not a part of a qualified expression
32+
room.adb:57:22: aggregate is not a part of a qualified expression
33+
room.adb:58:22: aggregate is not a part of a qualified expression
34+
room.adb:59:22: aggregate is not a part of a qualified expression
35+
room.adb:60:01: multiple blank lines
36+
room.adb:62:25: anonymous subtype
37+
room.ads:18:03: Table_Size does not start with constant prefix C_
38+
room.ads:19:11: Table_Type does not start with subtype prefix T_
39+
room.ads:21:12: anonymous array type
40+
room.ads:23:03: violation of restriction "No_Tasking"
41+
screen.adb:15:11: Int_IO does not have casing specified (mixed)
42+
screen.adb:22:13: ClearScreen does not have casing specified (mixed)
43+
screen.adb:28:13: MoveCursor does not have casing specified (mixed)
44+
screen.ads:10:03: ScreenHeight does not have casing specified (mixed)
45+
screen.ads:10:03: ScreenHeight does not start with constant prefix C_
46+
screen.ads:11:03: ScreenWidth does not have casing specified (mixed)
47+
screen.ads:11:03: ScreenWidth does not start with constant prefix C_
48+
screen.ads:13:11: Height does not start with subtype prefix T_
49+
screen.ads:14:11: Width does not start with subtype prefix T_
50+
screen.ads:16:08: Position does not end with type suffix _Type
51+
screen.ads:16:08: Position does not start with subtype prefix T_
52+
screen.ads:25:13: ClearScreen does not have casing specified (mixed)
53+
screen.ads:29:13: MoveCursor does not have casing specified (mixed)
54+
society.ads:11:11: Unique_DNA_Codes does not have casing specified (mixed)
55+
society.ads:11:11: Unique_DNA_Codes does not start with subtype prefix T_
56+
society.ads:13:19: anonymous array type
57+
society.ads:13:46: anonymous subtype
58+
windows.adb:11:18: UpperLeft does not have casing specified (mixed)
59+
windows.adb:18:22: aggregate is not a part of a qualified expression
60+
windows.adb:23:13: EraseToEndOfLine does not have casing specified (mixed)
61+
windows.adb:26:18: anonymous subtype
62+
windows.adb:62:18: anonymous subtype
63+
windows.adb:93:20: anonymous subtype
64+
windows.adb:107:18: anonymous subtype
65+
windows.adb:113:18: anonymous subtype
66+
windows.adb:114:26: aggregate is not a part of a qualified expression
67+
windows.adb:116:26: aggregate is not a part of a qualified expression
68+
windows.adb:121:24: aggregate is not a part of a qualified expression
69+
windows.adb:123:18: anonymous subtype
70+
windows.adb:129:17: aggregate is not a part of a qualified expression
71+
windows.adb:130:17: aggregate is not a part of a qualified expression
72+
windows.adb:134:13: MoveCursor does not have casing specified (mixed)
73+
windows.ads:11:08: Window does not end with type suffix _Type
74+
windows.ads:11:08: Window does not start with subtype prefix T_
75+
windows.ads:13:18: UpperLeft does not have casing specified (mixed)
76+
windows.ads:33:13: MoveCursor does not have casing specified (mixed)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
driver: gnatcheck
2+
format: brief
3+
project: simple
4+
check_flags: False

testsuite/testsuite.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ def set_up(self) -> None:
163163
# Directory that contains GPR files, shared by testcases
164164
os.environ['GPR_PROJECT_PATH'] = P.pathsep.join([
165165
P.join(self.root_dir, 'ada_projects'),
166+
P.abspath(
167+
P.join(
168+
self.root_dir,
169+
'..',
170+
'lkql_checker',
171+
'share',
172+
'examples'
173+
)
174+
),
166175
os.environ.get('GPR_PROJECT_PATH', ''),
167176
])
168177

0 commit comments

Comments
 (0)