File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
testsuite/tests/345-live-observability Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 24
24
extra_coverage_args = [],
25
25
)
26
26
27
+ # In case block instrumentation is enabled, the number of bits set to 1 in the
28
+ # buffers is not equivalent to the number of statements executed.
29
+ if thistest .options .block :
30
+ counts = [0 , 0 , 3 ]
31
+ else :
32
+ counts = [2 , 4 , 8 ]
33
+
27
34
OUTPUT = contents_of ("main_output.txt" )
28
35
29
36
thistest .fail_if_no_match (
30
- "Wrong first buffer sum" , re .compile (r".*First: *2.*" , re .S ), OUTPUT
37
+ "Wrong first buffer sum" ,
38
+ re .compile (f".*First: *{ counts [0 ]} .*" , re .S ),
39
+ OUTPUT ,
31
40
)
32
41
33
42
thistest .fail_if_no_match (
34
- "Wrong second buffer sum" , re .compile (r".*Second: *4.*" , re .S ), OUTPUT
43
+ "Wrong second buffer sum" ,
44
+ re .compile (f".*Second: *{ counts [1 ]} .*" , re .S ),
45
+ OUTPUT ,
35
46
)
36
47
37
48
thistest .fail_if_no_match (
38
- "Wrong third buffer sum" , re .compile (r".*Third: *8.*" , re .S ), OUTPUT
49
+ "Wrong third buffer sum" ,
50
+ re .compile (f".*Third: *{ counts [2 ]} .*" , re .S ),
51
+ OUTPUT ,
39
52
)
40
53
41
54
thistest .result ()
Original file line number Diff line number Diff line change @@ -11152,15 +11152,15 @@ package body Instrument.Ada_Unit is
11152
11152
Create_File (Prj, Body_File, Obs_Body_Filename);
11153
11153
11154
11154
Spec_File.Put_Line (" package " & Obs_Unit_Name & " is" );
11155
- Spec_File.Put_Line (" function Sum_Buffer_Bits return Positive ;" );
11155
+ Spec_File.Put_Line (" function Sum_Buffer_Bits return Natural ;" );
11156
11156
Spec_File.Put_Line (" end " & Obs_Unit_Name & " ;" );
11157
11157
11158
11158
Body_File.Put_Line (" with Interfaces.C;" );
11159
11159
Body_File.Put_Line
11160
11160
(" with GNATcov_RTS.Buffers.Lists; use GNATcov_RTS.Buffers.Lists;" );
11161
11161
Body_File.New_Line;
11162
11162
Body_File.Put_Line (" package body " & Obs_Unit_Name & " is" );
11163
- Body_File.Put_Line (" function Sum_Buffer_Bits return Positive is" );
11163
+ Body_File.Put_Line (" function Sum_Buffer_Bits return Natural is" );
11164
11164
Body_File.Put_Line (" function Sum_Buffer_Bits_C" );
11165
11165
Body_File.Put_Line
11166
11166
(" (C_List : GNATcov_RTS_Coverage_Buffers_Group_Array)" );
@@ -11170,7 +11170,7 @@ package body Instrument.Ada_Unit is
11170
11170
& " "" gnatcov_rts_sum_buffer_bits"" );" );
11171
11171
Body_File.Put_Line (" begin" );
11172
11172
Body_File.Put_Line
11173
- (" return Positive (Sum_Buffer_Bits_C ("
11173
+ (" return Natural (Sum_Buffer_Bits_C ("
11174
11174
& Buf_List_Unit_Name & " .C_List));" );
11175
11175
Body_File.Put_Line (" end;" );
11176
11176
Body_File.Put_Line (" end " & Obs_Unit_Name & " ;" );
You can’t perform that action at this time.
0 commit comments