Skip to content

Commit

Permalink
Eliminate "let _ =" constructs in testing
Browse files Browse the repository at this point in the history
These are represented as top-level expressions in 4.02, but bindings in
4.03. The difference was causing spurious failures in report testing.
  • Loading branch information
aantron committed Apr 16, 2016
1 parent 0dbbf37 commit a83db52
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
5 changes: 2 additions & 3 deletions tests/ounit-integration/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ let test_suite =
let suite =
"all" >::: [
test_suite;
]
];;

let _ =
run_test_tt_main suite
run_test_tt_main suite
Binary file modified tests/report/reference.bisect
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/report/reference.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-;6;6;4;6;1;1;0;4;0;1;0;0;5;15;0;0;0;0;0;0;0;0;1;1;2;2;19;36
source.ml;6;6;4;6;1;1;0;4;0;1;0;0;5;15;0;0;0;0;0;0;0;0;1;1;2;2;19;36
-;6;6;4;6;1;1;0;4;0;1;0;0;5;16;0;0;0;0;0;0;0;0;0;0;2;2;18;36
source.ml;6;6;4;6;1;1;0;4;0;1;0;0;5;16;0;0;0;0;0;0;0;0;0;0;2;2;18;36
2 changes: 1 addition & 1 deletion tests/report/reference.dump
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ file "source.ml"
point match/function at offset 726: 2
point match/function at offset 742: 0
point sequence at offset 764: 2
point toplevel expression at offset 780: 2
point match/function at offset 782: 0
7 changes: 4 additions & 3 deletions tests/report/reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>
<span class="dirname"></span>source.ml
</a>
</h1>
<h2>52.78%</h2>
<h2>50.00%</h2>
</div>
<div id="navbar">
<span class="unvisited" style="top:50.00%"></span>
Expand All @@ -27,6 +27,7 @@ <h2>52.78%</h2>
<span class="unvisited" style="top:78.00%"></span>
<span class="unvisited" style="top:80.00%"></span>
<span class="unvisited" style="top:92.00%"></span>
<span class="unvisited" style="top:100.00%"></span>
</div>
<div id="report">
<div id="lines-layer">
Expand Down Expand Up @@ -80,7 +81,7 @@ <h2>52.78%</h2>
<a id="L47"></a><span > </span>
<a id="L48"></a><span class="visited"> </span>
<a id="L49"></a><span > </span>
<a id="L50"></a><span class="visited"> </span>
<a id="L50"></a><span class="unvisited"> </span>
</pre>
</div>
<div id="text-layer">
Expand Down Expand Up @@ -186,7 +187,7 @@ <h2>52.78%</h2>
(0, 0)
|&gt; <span data-count="2">i</span>gnore

let _ = <span data-count="2">"</span>a string to confound Buffer.add_substitute $("
let f _ = <span data-count="0">"</span>a string to confound Buffer.add_substitute $("
</pre>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions tests/report/reference.text
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Summary:
- 'if/then' points: 0/4 (0.00%)
- 'try' points: 0/1 (0.00%)
- 'while' points: none
- 'match/function' points: 5/15 (33.33%)
- 'match/function' points: 5/16 (31.25%)
- 'class expression' points: none
- 'class initializer' points: none
- 'class method' points: none
- 'class value' points: none
- 'toplevel expression' points: 1/1 (100.00%)
- 'toplevel expression' points: none
- 'lazy operator' points: 2/2 (100.00%)
- total: 19/36 (52.78%)
- total: 18/36 (50.00%)
File 'source.ml':
- 'binding' points: 6/6 (100.00%)
- 'sequence' points: 4/6 (66.67%)
- 'for' points: 1/1 (100.00%)
- 'if/then' points: 0/4 (0.00%)
- 'try' points: 0/1 (0.00%)
- 'while' points: none
- 'match/function' points: 5/15 (33.33%)
- 'match/function' points: 5/16 (31.25%)
- 'class expression' points: none
- 'class initializer' points: none
- 'class method' points: none
- 'class value' points: none
- 'toplevel expression' points: 1/1 (100.00%)
- 'toplevel expression' points: none
- 'lazy operator' points: 2/2 (100.00%)
- total: 19/36 (52.78%)
- total: 18/36 (50.00%)
14 changes: 7 additions & 7 deletions tests/report/reference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<element kind="if/then" count="0" total="4"/>
<element kind="try" count="0" total="1"/>
<element kind="while" count="0" total="0"/>
<element kind="match/function" count="5" total="15"/>
<element kind="match/function" count="5" total="16"/>
<element kind="class expression" count="0" total="0"/>
<element kind="class initializer" count="0" total="0"/>
<element kind="class method" count="0" total="0"/>
<element kind="class value" count="0" total="0"/>
<element kind="toplevel expression" count="1" total="1"/>
<element kind="toplevel expression" count="0" total="0"/>
<element kind="lazy operator" count="2" total="2"/>
<element kind="total" count="19" total="36"/>
<element kind="total" count="18" total="36"/>
</summary>
<file path="source.ml">
<summary>
Expand All @@ -24,14 +24,14 @@
<element kind="if/then" count="0" total="4"/>
<element kind="try" count="0" total="1"/>
<element kind="while" count="0" total="0"/>
<element kind="match/function" count="5" total="15"/>
<element kind="match/function" count="5" total="16"/>
<element kind="class expression" count="0" total="0"/>
<element kind="class initializer" count="0" total="0"/>
<element kind="class method" count="0" total="0"/>
<element kind="class value" count="0" total="0"/>
<element kind="toplevel expression" count="1" total="1"/>
<element kind="toplevel expression" count="0" total="0"/>
<element kind="lazy operator" count="2" total="2"/>
<element kind="total" count="19" total="36"/>
<element kind="total" count="18" total="36"/>
</summary>
<point offset="10" count="2" kind="binding"/>
<point offset="26" count="2" kind="binding"/>
Expand Down Expand Up @@ -68,6 +68,6 @@
<point offset="726" count="2" kind="match/function"/>
<point offset="742" count="0" kind="match/function"/>
<point offset="764" count="2" kind="sequence"/>
<point offset="780" count="2" kind="toplevel expression"/>
<point offset="782" count="0" kind="match/function"/>
</file>
</bisect-report>
2 changes: 1 addition & 1 deletion tests/report/reference.xml-emma
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<all name="all classes">
<coverage type="class, %" value="100% (1/1)"/>
<coverage type="method, %" value="100% (1/1)"/>
<coverage type="block, %" value="51% (18/35)"/>
<coverage type="block, %" value="50% (18/36)"/>
<coverage type="line, %" value="100% (1/1)"/>
</all>
</data>
Expand Down
2 changes: 1 addition & 1 deletion tests/report/source.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ let () =
(0, 0)
|> ignore

let _ = "a string to confound Buffer.add_substitute $("
let f _ = "a string to confound Buffer.add_substitute $("

0 comments on commit a83db52

Please sign in to comment.