File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- #Exercises for Chapter 21
1
+ # Exercises for Chapter 21
2
2
3
- ##1 . Add an error to dict.erl. Compile the module.
3
+ ## 1. Add an error to dict.erl. Compile the module.
4
4
I have altered ` dict.erl ` so a certain line in it will cause it to crash. ` dict.erl ` is stored in the ` exercise_1/ ` directory.
5
5
6
- ##2 . Write a simple test module that calls dict in various ways to uncover the error.
6
+ ## 2. Write a simple test module that calls dict in various ways to uncover the error.
7
7
Test module is in ` exercise_2/ ` . In this directory, run:
8
8
9
9
erlc exercise_1/dict.erl exercise_2/dict_test.erl
@@ -14,7 +14,7 @@ And then in the Erlang console run the tests:
14
14
dict_test:test().
15
15
16
16
17
- ##3 . Use the code coverage tool to see how many lines in the dict module are being executed by the test module.
17
+ ## 3. Use the code coverage tool to see how many lines in the dict module are being executed by the test module.
18
18
The code coverage script is stored in the ` exercise_3 ` directory. To run the code coverage analysis compile the code and start an erl console:
19
19
20
20
erlc exercise_1/dict.erl exercise_2/dict_test.erl exercise_3/dict_test_coverage.erl
@@ -24,7 +24,7 @@ And then in the Erlang console run the command to generate the code coverage res
24
24
25
25
dict_test_coverage:coverage().
26
26
27
- ##4 . Use the dbg module to find the error in the dict module
27
+ ## 4. Use the dbg module to find the error in the dict module
28
28
The dbg script is stored in the ` exercise_4 ` directory. To run the dbg tracing on the dict module compile the code and start an erl console:
29
29
30
30
erlc exercise_1/dict.erl exercise_2/dict_test.erl exercise_3/dict_test_coverage.erl
You can’t perform that action at this time.
0 commit comments