mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-18 07:21:24 +01:00
Move version pprint into Version module
This commit is contained in:
parent
33aa9228e2
commit
081ed58524
2 changed files with 5 additions and 12 deletions
|
|
@ -1,18 +1,7 @@
|
|||
open Lib;
|
||||
|
||||
let pprint = (pp_fmt, version) => {
|
||||
Versions.(
|
||||
Fmt.pf(
|
||||
pp_fmt,
|
||||
"{ major: %d, minor: %d, point: %d }",
|
||||
version.major,
|
||||
version.minor,
|
||||
version.point,
|
||||
)
|
||||
);
|
||||
};
|
||||
let testable_version =
|
||||
Alcotest.testable(pprint, (a, b) => Versions.compare(a, b) == 0);
|
||||
Alcotest.testable(Versions.pprint, (a, b) => Versions.compare(a, b) == 0);
|
||||
|
||||
let check_version =
|
||||
Alcotest.(check(Alcotest.result(testable_version, string)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue