Skip to content

Commit d3c0731

Browse files
Merge branch 'slides/178-minor_typos' into 'master'
Fix minor typos Closes #178 See merge request feng/training/material!218
2 parents 86c6b2d + d7d3287 commit d3c0731

11 files changed

+38
-66
lines changed

courses/gnatdas/010_overview.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ What Is Dynamic Analysis?
6565
What Is GNAT DAS?
6666
-------------------
6767

68-
+ Two tools that can work together to analyze code execution
68+
+ Tools that can work together to analyze code execution
6969

7070
+ :toolname:`GNATcoverage`
7171

@@ -74,3 +74,7 @@ What Is GNAT DAS?
7474
+ :toolname:`GNATtest`
7575

7676
+ Creates framework to build software tests for your codebase
77+
78+
+ :toolname:`GNATfuzz`
79+
80+
+ Automates dynamic testing by generating and executing test cases to discover software vulnerabilities

courses/gnatdas/cover_010_overview.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Statement Coverage
8585
.. image:: gnatdas/cover_statement.png
8686
:width: 75%
8787

88-
* Call :ada:`Test_Statement` with :ada:`(1, 2, Integer'Last)`
88+
* Call :ada:`Test_Statement` with :ada:`(1, 2, Integer'Last, X)`
8989

9090
* Congratulations: 100% Statement Coverage! But...
9191

@@ -109,7 +109,7 @@ Decision Coverage
109109

110110
.. image:: gnatdas/cover_decision.png
111111

112-
* Call :ada:`Test_Decision` with :ada:`(0, 0, 0)` and :ada:`(1, 1, Integer'Last)`
112+
* Call :ada:`Test_Decision` with :ada:`(0, 0, 0, X)` and :ada:`(1, 1, Integer'Last, X)`
113113

114114
* Congratulations: 100% Decision Coverage! But...
115115

@@ -218,7 +218,7 @@ Modified Condition/Decision Coverage Example
218218
.. image:: gnatdas/cover_mcdc.png
219219
:width: 75%
220220

221-
* Call :ada:`Test_Mcdc` with :ada:`(1, 0, 0)`, :ada:`(0, 1, 0)`, and :ada:`(1, 1, 0)`
221+
* Call :ada:`Test_Mcdc` with :ada:`(1, 0, 0, X)`, :ada:`(0, 1, 0, X)`, and :ada:`(1, 1, 0, X)`
222222

223223
* Better test results, but we need more tests
224224
* In general, if there are N subconditions, need N+1 sets of data to get complete MCDC coverage

courses/gnatdas/cover_030_advanced_topics.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ xml
352352
.. container:: latex_environment tiny
353353

354354
With exemptions
355-
356355
::
357356

358357
60% of 5 lines covered

courses/gnatdas/labs/test_030_controlling_gnattest.lab.rst

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ Build Harness for One Unit
5757
Create Tests
5858
--------------
5959

60-
* Re-write or copy the test answers from the *Usage* lab (or use these)
61-
62-
.. container:: latex_environment tiny
60+
* Re-write or copy the test answers from the *Usage* lab (here are some examples)
6361

6462
.. code:: Ada
6563
@@ -96,35 +94,6 @@ Create Tests
9694
Reset;
9795
AUnit.Assertions.Assert (Empty, "Stack not empty");
9896

99-
-- Full
100-
while not Full loop
101-
Push (567);
102-
end loop;
103-
Push (999);
104-
AUnit.Assertions.Assert (Full and then Top = 567,
105-
"Full check failed");
106-
107-
-- Top
108-
Reset;
109-
declare
110-
Pushed : constant integer := 234;
111-
begin
112-
Push (Pushed);
113-
AUnit.Assertions.Assert (Pushed = Top,
114-
"Top test failed");
115-
end;
116-
117-
-- Count
118-
Reset;
119-
Push (111);
120-
AUnit.Assertions.Assert (Count = 1,
121-
"Count test failed");
122-
123-
-- Reset
124-
Reset;
125-
AUnit.Assertions.Assert (Count = 0 and then Empty,
126-
"Reset test failed");
127-
12897
-----------------------------------
12998
Ensure Every Test Starts the Same
13099
-----------------------------------

courses/gnatdas/test_020_usage.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Building a Test Harness
6969

7070
* To run the driver, build and run the executable in the :filename:`obj/driver` folder
7171

72+
* Executable is called :command:`test_runner`
73+
7274
.. container:: latex_environment tiny
7375

7476
::
@@ -77,7 +79,7 @@ Building a Test Harness
7779
gprbuild -P test_driver
7880
test_runner
7981

80-
Gives the result::
82+
*Gives the result* ::
8183

8284
simple.ads:3:4: error: corresponding test FAILED: Test not implemented. (simple-test_data-tests.adb:44)
8385
simple.ads:7:4: error: corresponding test FAILED: Test not implemented. (simple-test_data-tests.adb:65)

courses/gnatdas/test_040_advanced_testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ Running Multiple Test Harnesses
134134

135135
.. container:: latex_environment tiny
136136

137-
::
137+
.. code:: output
138138
139-
dependent.ads:2:4: error: corresponding test FAILED: Test not implemented. (dependent-test_data-tests.adb:44)
139+
depend.ads:2:4: error: corresponding test FAILED: Test not implemented. (depend-test_data-tests.adb:44)
140140
simple.ads:7:4: error: corresponding test FAILED: Test not implemented. (simple-test_data-tests.adb:65)
141141
simple.ads:3:4: error: corresponding test FAILED: Test not implemented. (simple-test_data-tests.adb:44)
142142
3 tests run: 0 passed; 3 failed; 0 crashed.

courses/gnatsas/check_020_getting_started.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,24 @@ Command Line Example Run
9999

100100
:command:`gnatcheck -P simple.gpr -rules -from=coding_standard.rules`
101101

102-
::
103-
104-
chop.adb:14:11: PIck_Up does not have casing specified (mixed)
105-
chop.ads:11:18: Stick does not start with subtype prefix T_
106-
phil.adb:21:11: Think_Times does not start with subtype prefix T_
107-
phil.adb:33:05: "Who_Am_I" is not modified, could be declared constant
108-
phil.ads:12:03: violation of restriction "No_Tasking"
109-
phil.ads:12:13: Philosopher does not start with subtype prefix T_
110-
phil.ads:12:26: My_ID does not have casing specified (mixed)
111-
phil.ads:19:08: States does not end with type suffix _Type
112-
phil.ads:19:08: States does not start with subtype prefix T_
113-
random_generic.ads:5:08: Result_Subtype does not end with type suffix _Type
114-
random_generic.ads:5:08: Result_Subtype does not start with subtype prefix T_
115-
room.adb:19:03: violation of restriction "No_Tasking"
116-
room.adb:19:23: anonymous subtype
117-
...
118-
119-
.. container:: latex_environment footnotesize
102+
.. container:: latex_environment scriptsize
103+
104+
.. code:: output
105+
106+
chop.adb:14:11: PIck_Up does not have casing specified (mixed)
107+
chop.ads:11:18: Stick does not start with subtype prefix T_
108+
phil.adb:21:11: Think_Times does not start with subtype prefix T_
109+
phil.adb:33:05: "Who_Am_I" is not modified, could be declared constant
110+
phil.ads:12:03: violation of restriction "No_Tasking"
111+
phil.ads:12:13: Philosopher does not start with subtype prefix T_
112+
phil.ads:12:26: My_ID does not have casing specified (mixed)
113+
phil.ads:19:08: States does not end with type suffix _Type
114+
phil.ads:19:08: States does not start with subtype prefix T_
115+
random_generic.ads:5:08: Result_Subtype does not end with type suffix _Type
116+
random_generic.ads:5:08: Result_Subtype does not start with subtype prefix T_
117+
room.adb:19:03: violation of restriction "No_Tasking"
118+
room.adb:19:23: anonymous subtype
119+
...
120120
121121
*These messages are coming from rules specified in* :filename:`coding_standard.rules`
122122

courses/gnatsas/check_040_lkql.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ Mapping Python API to LKQL API
219219
220220
val expr_types = [node.p_expression_type() for node in select Expr]
221221
222-
In the future LKQL will have its own LAL API documentation.
223-
224222
-------------------------------
225223
Integrating LKQL in GNATcheck
226224
-------------------------------

courses/gnatsas/sas_010_introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Why Use :toolname:`GNAT SAS`?
7474

7575
+ Efficient automated code reviewer
7676

77-
+ Identifies run-time errors with a **level of certainty**
77+
+ Identifies runtime errors with a **level of certainty**
7878

7979
+ E.g. buffer overflows, division by zero
8080

courses/gnatsas/sas_020_overview.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ GNAT SAS in a Nutshell (2/2)
104104

105105
+ Detects runtime and logic errors
106106

107-
+ Initialization errors, run-time errors and assertion failures
107+
+ Initialization errors, runtime errors and assertion failures
108108
+ Race condition errors: unprotected access to globals
109109

110110
+ Warns on dead or suspicious code
@@ -128,8 +128,8 @@ Integrated Analysis Engines
128128

129129
+ Inspector
130130

131-
+ Excels in detecting possibly failing run-time checks as well as wide range of logical errors
132-
+ Determines preconditions on the inputs necessary to preclude run-time failures
131+
+ Excels in detecting possibly failing runtime checks as well as wide range of logical errors
132+
+ Determines preconditions on the inputs necessary to preclude runtime failures
133133
+ Makes presumptions about return values of external subprograms
134134
+ Identifies postconditions that characterize the range of outputs
135135

@@ -143,7 +143,7 @@ Integrated Analysis Engines
143143
+ GNAT Warnings
144144

145145
+ Provides warning issued by GNAT compiler frontend
146-
+ Detects things like suspicious constructs and warnings when the compiler is sure an exception will be raised at run-time
146+
+ Detects things like suspicious constructs and warnings when the compiler is sure an exception will be raised at runtime
147147

148148
+ GNATcheck
149149

0 commit comments

Comments
 (0)