Skip to content

Commit d4d3075

Browse files
committed
Read the signatures in reverse order in the deferred copy test
List.rev_map applies its function from the head, so the test read the signatures in the order they were reserved; it now reads the last one first, so each copy is made with stamps and ids reserved before others. Signed-off-by: Jono Prest <jjprest@gmail.com>
1 parent 4eabf11 commit d4d3075

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/ounit_tests/ounit_deferred_signature_tests.ml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ let run ~eager dirs names =
5252
names
5353
in
5454
let read =
55-
List.rev_map
55+
(* [List.map] applies its function from the head: read the
56+
last unit's signature first. *)
57+
List.map
5658
(fun name -> (Env.find_module (unit_path name) env).md_type)
57-
names
59+
(List.rev names)
5860
in
5961
Marshal.to_string (asked, read, probe ()) [])))
6062

0 commit comments

Comments
 (0)