Persistent store with Git semantics: lazy reads, delayed writes, content-addressing
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

merlint sweep: fix irmin and memtrace

- irmin: add test/git/test_irmin_git.{ml,mli} + dune so E605 stops
flagging Irmin_git as a library module without a corresponding test
file. Tests cover the git_hash <-> irmin_hash roundtrip.
- memtrace: drop the unused [enabled] entry point. It was the only
exported value with a [string array] type, which tripped E351
(exposed global mutable state). [trace_if_requested] already covers
the use case.

+27
+3
test/git/dune
··· 1 + (test 2 + (name test) 3 + (libraries irmin_git nox-irmin nox-git alcotest))
+1
test/git/test.ml
··· 1 + let () = Alcotest.run "Irmin_git" [ Test_irmin_git.suite ]
+21
test/git/test_irmin_git.ml
··· 1 + let hash_roundtrip () = 2 + let h = Irmin.Hash.sha1 "hello" in 3 + let g = Irmin_git.git_hash h in 4 + let h' = Irmin_git.irmin_hash g in 5 + Alcotest.(check bool) "roundtrip preserves hash" true (Irmin.Hash.equal h h') 6 + 7 + let hash_roundtrip_reverse () = 8 + let g = Git.Hash.digest_string ~kind:`Blob "hello" in 9 + let h = Irmin_git.irmin_hash g in 10 + let g' = Irmin_git.git_hash h in 11 + Alcotest.(check string) 12 + "roundtrip preserves git hash" (Git.Hash.to_hex g) (Git.Hash.to_hex g') 13 + 14 + let suite = 15 + ( "irmin_git", 16 + [ 17 + Alcotest.test_case "hash roundtrip irmin->git->irmin" `Quick 18 + hash_roundtrip; 19 + Alcotest.test_case "hash roundtrip git->irmin->git" `Quick 20 + hash_roundtrip_reverse; 21 + ] )
+2
test/git/test_irmin_git.mli
··· 1 + val suite : string * unit Alcotest.test_case list 2 + (** Alcotest suite for the {!Irmin_git} module. *)