• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MinaProtocol / mina / 538

25 Aug 2025 05:35PM UTC coverage: 61.202% (+0.4%) from 60.772%
538

push

buildkite

web-flow
Merge pull request #17673 from MinaProtocol/amcie-merge-release320-to-master

amcie-merge-release320-to-master

3142 of 4828 new or added lines in 308 files covered. (65.08%)

205 existing lines in 68 files now uncovered.

50733 of 82894 relevant lines covered (61.2%)

470098.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/src/lib/rosetta_coding/test/test_rosetta_coding.ml
1
open Core_kernel
2
open Rosetta_coding.Coding
3
module Field = Snark_params.Tick.Field
4
module Scalar = Snark_params.Tick.Inner_curve.Scalar
5
open Signature_lib
6

7
let field_hex_roundtrip_test () =
8
  let field0 = Field.of_int 123123 in
1✔
9
  let hex = of_field field0 in
1✔
10
  let field1 = to_field hex in
1✔
11
  Alcotest.(check bool) "field hex roundtrip" true (Field.equal field0 field1)
1✔
12

13
let pk_roundtrip_test () =
14
  let pk =
1✔
15
    { Public_key.Compressed.Poly.x = Field.of_int 123123; is_odd = true }
1✔
16
  in
17
  let hex = of_public_key_compressed pk in
18
  let pk' = to_public_key_compressed hex in
1✔
19
  Alcotest.(check bool)
1✔
20
    "public key roundtrip" true
21
    (Public_key.Compressed.equal pk pk')
1✔
22

23
let hex_key_odd =
24
  "fad1d3e31aede102793fb2cce62b4f1e71a214c94ce18ad5756eba67ef398390"
25

26
let hex_key_even =
27
  "7e406ca640115a8c44ece6ef5d0c56af343b1a993d8c871648ab7980ecaf8230"
28

29
let pk_compressed_roundtrip_test hex_key () =
30
  let pk = to_public_key hex_key in
2✔
31
  let hex' = of_public_key pk in
2✔
32
  Alcotest.(check string)
2✔
33
    "public key compressed roundtrip" (String.lowercase hex_key)
2✔
34
    (String.lowercase hex')
2✔
35

36
let pk_compressed_roundtrip_odd_test () =
37
  pk_compressed_roundtrip_test hex_key_odd ()
1✔
38

39
let pk_compressed_roundtrip_even_test () =
40
  pk_compressed_roundtrip_test hex_key_even ()
1✔
41

42
let tests =
43
  [ ("field_hex_roundtrip", `Quick, field_hex_roundtrip_test)
44
  ; ("pk_roundtrip", `Quick, pk_roundtrip_test)
45
  ; ("pk_compressed_roundtrip_odd", `Quick, pk_compressed_roundtrip_odd_test)
46
  ; ("pk_compressed_roundtrip_even", `Quick, pk_compressed_roundtrip_even_test)
47
  ]
48

49
let () =
50
  let open Alcotest in
NEW
51
  run "Rosetta_coding" [ ("roundtrip_tests", tests) ]
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc