Skip to content

Commit 059087f

Browse files
PeterCardenaslewis6991
authored andcommitted
test: add context markers to existing test files
1 parent 9c4c354 commit 059087f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+805
-663
lines changed

test/lang/test.adb

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
with Ada.Text_IO; use Ada.Text_IO;
22

3-
package Week is
3+
-- {{TEST}}
4+
package Week is -- {{CONTEXT}}
45

56
Mon : constant String := "Monday";
67
Tue : constant String := "Tuesday";
78
Wed : constant String := "Wednesday";
89
Thu : constant String := "Thursday";
910
Fri : constant String := "Friday";
1011
Sat : constant String := "Saturday";
11-
Sun : constant String := "Sunday";
12+
Sun : constant String := "Sunday"; -- {{CURSOR}}
1213

1314

1415

1516
end Week;
1617

17-
package Months
18+
-- {{TEST}}
19+
package Months -- {{CONTEXT}}
1820
is
1921

2022
Jan : constant String := "January";
21-
Feb : constant String := "February";
23+
Feb : constant String := "February"; -- {{CURSOR}}
2224

2325

2426

@@ -31,93 +33,98 @@ is
3133

3234
end Months;
3335

34-
procedure Show_Increment is
36+
-- {{TEST}}
37+
procedure Show_Increment is -- {{CONTEXT}}
3538
A, B, C : Integer;
3639

37-
procedure Display_Result is
40+
procedure Display_Result is -- {{CONTEXT}}
3841
begin
3942
Put_Line ("Increment of "
4043
& Integer'Image (A)
4144
& " with "
4245
& Integer'Image (B)
4346
& " is "
44-
& Integer'Image (C));
47+
& Integer'Image (C)); -- {{CURSOR}}
4548

4649

4750
end Display_Result;
4851

52+
-- {{POPCONTEXT}}
4953
begin
5054
A := 10;
5155
B := 3;
5256
C := Increment_By (A, B);
5357
Display_Result;
5458
A := 20;
5559
B := 5;
56-
C := Increment_By (A, B);
60+
C := Increment_By (A, B); -- {{CURSOR}}
5761
Display_Result;
5862
end Show_Increment;
5963

6064

61-
type Date is
65+
-- {{TEST}}
66+
type Date is -- {{CONTEXT}}
6267
record
6368
Day : Integer range 1 .. 31;
6469

6570
Month : Months := Jan;
6671

6772

6873

69-
74+
-- {{CURSOR}}
7075
end record;
7176

72-
procedure Greet is
77+
-- {{TEST}}
78+
procedure Greet is -- {{CONTEXT}}
7379
begin
7480

7581
X := 2;
7682

7783
Ada.Text_IO.Put_Line ("Hello");
7884

7985

80-
for N in 1 .. 5 loop
86+
for N in 1 .. 5 loop -- {{CONTEXT}}
8187

8288

8389
Put_Line("Hi");
8490

85-
91+
-- {{CURSOR}}
8692
end loop;
87-
93+
-- {{POPCONTEXT}}
8894
Y := 1;
89-
loop
95+
loop -- {{CONTEXT}}
9096

9197

9298
exit when Y = 5;
9399

94-
100+
-- {{CURSOR}}
95101
end loop;
96-
97-
while Y >= 0 loop
102+
-- {{POPCONTEXT}}
103+
while Y >= 0 loop -- {{CONTEXT}}
98104
Y := Y - 1;
99105

100106

101107

102-
108+
-- {{CURSOR}}
103109
end loop;
104110

105111

106-
107-
case Y is
112+
-- {{POPCONTEXT}}
113+
case Y is -- {{CONTEXT}}
108114
when 0 .. 10 =>
109115
Put_Line("foo");
110116

111117

112118

113119
when others =>
114-
Put_Line("bar");
120+
Put_Line("bar"); -- {{CURSOR}}
115121
end case;
116122

117123
end Greet;
118124

119125

120-
function Foo
126+
-- {{TEST}}
127+
function Foo -- {{CONTEXT}}
121128
(I : Integer := 0;)
122129
return Integer is
123130
begin
@@ -126,7 +133,7 @@ begin
126133

127134

128135

129-
return I + 1;
136+
return I + 1; -- {{CURSOR}}
130137
end Foo;
131138

132139

test/lang/test.apex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1+
// {{TEST}}
12
public class MyClass {
23

34

45

56

67

7-
public void my_method(Integer param) {
8+
public void my_method(Integer param) { // {{CONTEXT}}
89

910

1011

1112

12-
if (true) {
13+
if (true) { // {{CONTEXT}}
1314

1415

1516

1617

17-
for (Integer i = 0; i < 10; i++) {
18+
for (Integer i = 0; i < 10; i++) { // {{CONTEXT}}
1819

1920

2021

2122

22-
for (Integer v : values) {
23+
for (Integer v : values) { // {{CONTEXT}}
2324

2425

2526

2627

27-
System.
28+
System. // {{CONTEXT}}
2829

2930

3031

31-
debug('a message');
32+
debug('a message'); // {{CURSOR}}
3233
}
3334
}
3435
}
3536
}
3637
}
38+
// vim: ft=apex

0 commit comments

Comments
 (0)