• 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

91.67
/src/lib/mina_stdlib/tests/test_graph_algorithms.ml
1
(** Testing
2
    -------
3
    Component:  Mina stdlib time
4
    Invocation: dune exec src/lib/mina_stdlib/tests/test_graph_algorithms.exe
5
    Subject:    Graph algorithms tests
6
*)
7

8
open Core_kernel
9

10
let test_tree_connectivity () =
11
  (*
12
        0
13
      /  \
14
      1   2
15
      |  / \
16
      3  4 5
17
  *)
18
  let tree =
1✔
19
    [ (0, [ 1; 2 ])
20
    ; (1, [ 3; 0 ])
21
    ; (2, [ 0; 4; 5 ])
22
    ; (3, [ 1 ])
23
    ; (4, [ 2 ])
24
    ; (5, [ 2 ])
25
    ]
26
  in
27
  let connectivity =
28
    Mina_stdlib.Graph_algorithms.connectivity (module Int) tree
29
  in
30
  Alcotest.(check int)
1✔
31
    "Tree connectivity should be 1" 1
32
    (Mina_stdlib.Nat.to_int connectivity)
1✔
33

34
let test_complete_graph_connectivity () =
35
  let complete_graph n =
1✔
36
    let all = List.init n ~f:Fn.id in
1✔
37
    List.init n ~f:(fun i -> (i, all))
1✔
38
  in
39
  let connectivity =
40
    Mina_stdlib.Graph_algorithms.connectivity (module Int) (complete_graph 4)
1✔
41
  in
42
  Alcotest.(check bool)
1✔
43
    "Complete graph has infinite connectivity" true
44
    (Mina_stdlib.Nat.at_least connectivity 10000)
1✔
45

46
let () =
47
  let open Alcotest in
NEW
48
  run "Graph Algorithms"
×
49
    [ ( "connectivity"
50
      , [ test_case "Tree connectivity" `Quick test_tree_connectivity
1✔
51
        ; test_case "Complete graph connectivity" `Quick
1✔
52
            test_complete_graph_connectivity
53
        ] )
54
    ]
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