text
stringlengths
0
601k
let t = DictString . ( insert " S " " s " t9 )
let tests = [ " insert first " ( >:: fun _ -> assert_equal ~ cmp : assoc_compare [ ( " A " , " a " ) ] ( DictString . to_list t1 ) ) ; " insert 2 " >:: ( fun _ -> assert_equal ~ cmp : assoc_compare [ ( " A " , " a " ) ; ( " L " , " l " ) ] ( DictString . to_list t2 ) ) ; " insert 2 " >:: ( fun _ -> assert_equal ~ cmp :...
module Expr : TESTABLE with type t = Micheline_printer . node = struct type t = Micheline_printer . node let pp = Micheline_printer . print_expr let rec equal l r = match ( l , r ) with | ( Int ( locl , il ) , Int ( locr , ir ) ) -> locl = locr && il = ir | ( String ( locl , sl ) , String ( locr , sr ) ) -> locl = locr...
let no_comment = Micheline_printer . { comment = None }
let comment c = Micheline_printer . { comment = Some c }
let expr : Micheline_printer . node testable = ( module Expr )
let int i = Int ( ( ) , Z . of_int i )
let str s = String ( ( ) , s )
let bytes bs = Bytes ( ( ) , bs )
let prim ( ? args = [ ] ) ( ? annots = [ ] ) p = Prim ( ( ) , p , args , annots )
let seq els = Seq ( ( ) , els )
let check_diff ~ descr ~ expected actual = check ' ( option expr ) ~ msg : descr ~ expected ~ actual
let test_identical _ = let descr = " For identical expressions , the diff is None . " in let expected : Micheline_printer . node option = None in let actual = diff ~ prev ( : seq [ ] ) ~ current ( : seq [ ] ) ( ) in check_diff ~ descr actual ~ expected ; let actual = diff ~ prev ( : int 12 ) ~ current ( : int 12 ) ( ) ...
let test_different_ints _ = check_diff ~ descr " : For ints the comment contains changed value . " ~ expected ( : Some ( Int ( comment " -> 32 " , Z . of_int 23 ) ) ) ( diff ~ prev ( : int 23 ) ~ current ( : int 32 ) ( ) )
let test_different_strings _ = check_diff ~ descr " : For strings the comment contains changed value . " ~ expected ( : Some ( String ( comment " -> " \ texos " " , \ " tezos " ) ) ) ( diff ~ prev ( : str " tezos " ) ~ current ( : str " texos " ) ( ) )
let test_different_prims _ = check_diff ~ descr " : For prims the comment contains changed prim name . " ~ expected ( : Some ( Prim ( comment " -> SUB " , " ADD " , [ ] , [ ] ) ) ) ( diff ~ prev ( : prim " ADD " ) ~ current ( : prim " SUB " ) ( ) )
let test_different_singleton_seqs _ = check_diff ~ descr " : Changed Seq elements are put in comments . " ~ expected ( : Some ( Seq ( no_comment , [ String ( comment " -> 32 " , " ADD " ) ] ) ) ) ( diff ~ prev ( : seq [ str " ADD " ] ) ~ current ( : seq [ int 32 ] ) ( ) )
let test_prev_seq_missing_element _ = check_diff ~ descr " : Elements added in current are marked with ' ' . " + ~ expected : ( Some ( Seq ( no_comment , [ String ( no_comment , " ADD " ) ; String ( no_comment , " MUL " ) ; String ( no_comment , " SUB " ) ; String ( comment " " , + " DIV " ) ; ] ) ) ) ( diff ( ) ~ prev...
let test_current_seq_missing_element _ = check_diff ~ descr " : Elements removed in current are marked with ' ' . " - ~ expected : ( Some ( Seq ( no_comment , [ String ( no_comment , " ADD " ) ; String ( no_comment , " MUL " ) ; String ( no_comment , " SUB " ) ; String ( comment " " , - " DIV " ) ; ] ) ) ) ( diff ( ) ~...
let test_seq_reordered_elements _ = check_diff ~ descr " : Reordered elements appear as just changed . " ~ expected : ( Some ( Seq ( no_comment , [ String ( no_comment , " ADD " ) ; String ( comment " -> " \ SUB " " , \ " MUL " ) ; String ( comment " -> " \ DIV " " , \ " SUB " ) ; String ( comment " -> " \ MUL " " , \ ...
let test_seq_replaced_elements _ = check_diff ~ descr " : Changed values are marked with ' ' . " -> ~ expected : ( Some ( Seq ( no_comment , [ String ( comment " -> 1 " , " ADD " ) ; String ( comment " -> 2 " , " MUL " ) ; String ( comment " -> 3 " , " SUB " ) ; String ( comment " -> 0 " , " DIV " ) ; ] ) ) ) ( diff ( ...
let test_missing_prim_argument _ = check_diff ~ descr " : Prim arguments removed in current are marked with ' ' . " - ~ expected : ( Some ( Prim ( no_comment , " TEST " , [ String ( comment " " , - " TRUE " ) ] , [ ] ) ) ) ( diff ~ prev ( : prim " TEST " ~ args [ : str " TRUE " ] ) ~ current ( : prim " TEST " ) ( ) )
let test_additional_prim_argument _ = check_diff ~ descr " : Prim arguments added in current are marked with ' ' . " + ~ expected : ( Some ( Prim ( no_comment , " TEST " , [ Int ( no_comment , Z . of_int 1 ) ; Int ( comment " -> 2 " , Z . of_int 3 ) ; Int ( comment " " , + Z . of_int 3 ) ; ] , [ ] ) ) ) ( diff ( ) ~ pr...
let test_annots_are_preserved _ = check_diff ~ descr " : Annotations should be preserved as in previous version . " ~ expected ( : Some ( Prim ( comment " -> SUB " , " ADD " , [ ] , [ " @ annot " ] ) ) ) ( diff ( ) ~ prev ( : prim " ADD " ~ annots [ " :@ annot " ] ) ~ current ( : prim " SUB " ~ annots [ " :@ annot " ] ...
let test_different_annotations_are_ignored _ = check_diff ~ descr " : Differences in annotations are ignored . " ~ expected : None ( diff ( ) ~ prev ( : prim " ADD " ~ annots [ " :@ annot " ] ) ~ current ( : prim " ADD " ) )
let tests = [ test_case " test_diff_identical " ` Quick test_identical ; test_case " test_diff_ints " ` Quick test_different_ints ; test_case " test_diff_strings " ` Quick test_different_strings ; test_case " test_diff_prims " ` Quick test_different_prims ; test_case " test_diff_singleton_seqs " ` Quick test_different_...
let ( ) = run ~ argv [ " " ] :|| " tezos - lib - micheline " [ ( " micheline " , tests ) ]
( try delete " zzz " ~ recursive : true with | _ -> ( ) ) ; return ( ) ; ; create " zzz " ; delete " zzz " ; return ( ) ; ; create " a / b / c " ~ parents : true ; delete " a " ~ recursive : true ; return ( ) ; ; show_raise ( fun ( ) -> create " / zzz " ) ; [ % expect { | ( raised ( file - error ( " Creating directory ...
let base_path c _ _ = c
let params vs _ = vs
let param_path k ps _ = List . assoc k ps
let disp_path _ r = match r with | None -> " " | Some r -> r
let assoc = list ( pair string string )
let literals = " literals " , [ " base cases " , ` Quick , begin fun ( ) -> let t0 , t1 = DSL . create [ " " , / fun _ _ -> ( ) ] , DSL . create [ " " , fun _ _ -> ( ) ] in let empty = DSL . create [ ] in let check = Alcotest . check ( option unit ) in let test_ok ~ msg tbl p = check msg ( dispatch tbl p ) ( Some ( ) )...
let params = " params " , [ " base cases " , ` Quick , begin fun ( ) -> let t0 = DSL . create [ ( " / foo /: id " , param_path " id " ) ; ( " / foo /: id /: bar " , param_path " bar " ) ; ( " / foo /: id / bar /: baz " , param_path " baz " ) ] in let check = Alcotest . check ( option string ) in let test_ok ~ msg p v =...
let wildcards = " wildcard " , [ let t0 = DSL . create [ " / foo " , /* disp_path ] in let check = Alcotest . check ( option string ) in let test_ok ~ msg p v = check msg ( dispatch t0 p ) ( Some v ) in " base cases " , ` Quick , begin fun ( ) -> test_ok ~ msg : " a trailing wildcard pattern matches just the prefix " "...
let ( ) = Alcotest . run " Dispatch . DSL tests " [ literals ; params ; wildcards ]
let qcheck_test_single_value_dists = QCheck . Test . make ~ count : 1000 ~ name " : sampling single value distribution " QCheck . ( int ) ( fun x -> sample ( return x ) = x )
let qcheck_test_single_value_uniform = QCheck . Test . make ~ count : 1000 ~ name " : sampling single value uniform distribution " QCheck . ( list_of_size ( fun _ -> 1 ) int ) ( fun x -> sample ( discrete_uniform x ) = List . hd_exn x )
let test_liftm ( ) = let open PplOps in Alcotest . ( check pass ) " " ( sample @@ ( normal 0 . 1 . . +~ normal 0 . 1 . ) ) 0 .
let test_right_id_law ( ) = ( )
let test_left_id_law ( ) = ( )
let test_assoc_law ( ) = ( )
let test_samples ( ) = Alcotest . ( check int ) " " ( sample ( return 1 ) ) 1
let test_sample_n ( ) = Alcotest . ( check pass ) " " ( sample_n 100 ( infer Unit_test_models . single_coin ( MH 100 ) ) ) [ ] ||
let test_sample_score ( ) = Alcotest . ( check pass ) " " ( sample_with_score Unit_test_models . grass_model ) ( true , Prob . of_float 0 . 2 )
let tests : unit test list = [ ( " sampling " , [ QCheck_alcotest . to_alcotest qcheck_test_single_value_dists ; QCheck_alcotest . to_alcotest qcheck_test_single_value_uniform ; ( " sample " , ` Quick , test_samples ) ; ( " sample with score " , ` Quick , test_sample_score ) ; ( " take n samples " , ` Quick , test_samp...
let id2 = Matrix . identity 2
let sigma1 = Matrix . from_array 2 2 [ | 1 . 0 ; 0 . 5 ; 0 . 5 ; 2 . 0 ] |
let test_mvnorm2 ( ) = let mu = Matrix . vector_from_array [ | 1 . 0 ; 1 . 0 ] | in let mvnorms1 = Distribution . samples_mvnorm mu id2 90 in Matrix . print_row_r mvnorms1 0 ; Matrix . print_row_r mvnorms1 1
let test_mvnorm22 ( ) = let mu = Matrix . vector_from_array [ | 0 . 6 ; 1 . 2 ] | in let sigma = Matrix . scmult id2 0 . 5 in let mvnorms1 = Distribution . samples_mvnorm mu sigma 90 in Matrix . print_row_r mvnorms1 0 ; Matrix . print_row_r mvnorms1 1
let test_mvnorm23 ( ) = let mu = Matrix . vector_from_array [ | 1 . 2 ; 0 . 7 ] | in let mvnorms1 = Distribution . samples_mvnorm mu sigma1 90 in Matrix . print_row_r mvnorms1 0 ; Matrix . print_row_r mvnorms1 1
let test_mvnorm3 ( ) = let mu = Matrix . vector_from_array [ | 1 . 0 ; 1 . 0 ; 1 . 0 ] | in let sigma = Matrix . identity 3 in let mvnorms1 = Distribution . sample_mvnorm mu sigma in Matrix . print mvnorms1
let ( ) = test_mvnorm2 ( ) ; test_mvnorm22 ( ) ; test_mvnorm23 ( ) ; test_mvnorm3 ( )
module type Test_IO_sig = sig include Distributed . Nonblock_io val run_fn : ' a t -> ' a val get_established_connection_count : unit -> int val reset_established_connection_count : unit -> unit val get_atexit_fns : unit -> ( unit -> unit t ) list val clear_atexit_fnns : unit -> unit end
module type Tests = sig val run_suite : unit -> unit end
module Make ( Test_io : Test_IO_sig ) : Tests = struct exception Test_ex exception Test_failure of string
let get_option ( v : ' a option ) : ' a = match v with | None -> assert false | Some v ' -> v '
module M = struct type t = string let string_of_message m = m end
let assert_equal msg expect actual = if expect = actual then ( ) else raise ( Test_failure msg )
let run_tests suite_name tests = Printf . printf " Running suite % s \ n " suite_name ; let buff_test_output = Buffer . create 1024 in let total_tests_ran = ref 0 in let total_tests_failed = ref 0 in let formatter_test_output = Format . formatter_of_buffer buff_test_output in let iter_fn ( test_name , test_fn ) = try (...
let test_run_wrapper test_name io_exp = Test_io . ( run_fn ( reset_established_connection_count ( ) ; clear_atexit_fnns ( ) ; log Debug ( fun ( ) -> Format . sprintf " ------ Starting test % s " ------ test_name ) >>= fun ( ) -> io_exp ( ) ) )
let test_return_bind _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref None in let test_proc ( ) = P . ( return 5 >>= fun i -> result := Some i ; return ( ) ) in test_run_wrapper " test_return_bind " ( fun ( ) -> P . ...
let test_spawn_local_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref false in let mres = ref None in let test_proc ( ) = P . ( get_self_node >>= fun local_node -> assert_equal " process should not have ...
let test_spawn_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . Remot...
let test_spawn_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . Remot...
let test_spawn_monitor_local_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref false in let result_monitor = ref None in let mres = ref None in let test_proc ( ) = P . ( get_self_node >>= fun local_node -...
let test_spawn_monitor_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P...
let test_spawn_monitor_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer...
let test_monitor_local_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref false in let result_monitor = ref None in let result_monitor2 = ref None in let another_monitor_proc pid_to_monitor ( ) = P . ( mon...
let test_monitor_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . Rem...
let test_monitor_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . Rem...
let test_unmonitor_local_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref false in let unmon_res = ref None in let unmon_res2 = ref None in let another_monitor_proc pid_to_monitor ( ) = P . ( monitor pid...
let test_unmonitor_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . R...
let test_unmonitor_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . R...
let test_unmonitor_from_spawn_monitor_local_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref false in let mres = ref None in let unmon_res = ref None in let test_proc ( ) = P . ( get_self_node >>= fun lo...
let test_unmonitor_from_spawn_monitor_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . ...
let test_unmonitor_from_spawn_monitor_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 4...
let test_get_remote_nodes_local_only _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let num_remote_nodes = ref ( - 1 ) in let test_proc ( ) = P . ( get_remote_nodes >>= fun nodes -> return ( num_remote_nodes := ( List . length node...
let test_get_remote_nodes_remote_local _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . R...
let test_get_remote_nodes_remote_conifg _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . R...
let test_broadcast_local_only _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let broadcast_received = ref 0 in let loop_back_received = ref None in let recv_proc ( ) = P . ( receive begin case ( function | " broadcast message " -> ...
let test_broadcast_remote_local _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . Remote_c...
let test_broadcast_remote_remote _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . Remote_c...
let test_send_local_only _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let received_message = ref None in let mres = ref None in let send_failed = ref false in let recv_proc ( ) = P . ( receive begin case ( function | " sent messa...
let test_send_remote_local _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . Remote_config...
let test_send_remote_remote _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . Remote_config...
let test_raise_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let expected_exception_happened = ref false in let receive_exception_proc ( ) = P . ( receive @@ case ( fun _ -> Some ( fun ( ) -> fail Test_ex ) ) >>= fun ...
let test_raise_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 " ; P . Remot...
let test_raise_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . Remot...
let test_monitor_dead_process_local_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let result = ref false in let result_monitor = ref None in let test_proc ( ) = P . ( get_self_node >>= fun local_node -> assert_equal "...
let test_monitor_dead_process_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . ...
let test_monitor_dead_process_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; P...
let test_add_remove_remote_nodes_in_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let add_pass = ref false in let remove_pass = ref false in let test_proc ( ) = P . ( catch ( fun ( ) -> add_remote_node " 9 . 9 . 9 . 9...
let test_add_remove_nodes_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Producer . R...
let test_selective_receive_local_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let selective_message = ref None in let other_messages_inorder = ref [ ] in let receiver_proc ( ) = P . ( receive @@ case ( function | " the one...
let test_selective_receive_local_remote_config _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Remote { P . Remote_config . node_name = " producer " ; P . Remote_config . local_port = 45000 ; P . Remote_config . connection_backlog = 10 ; P . Remote_config . node_ip = " 127 . 0 . 0 . 1 "...
let test_selective_receive_remote_remote_config _ = let module Producer = Distributed . Make ( Test_io ) ( M ) in let module Consumer = Distributed . Make ( Test_io ) ( M ) in let node_config = Producer . Remote { Producer . Remote_config . node_name = " producer " ; Producer . Remote_config . local_port = 45000 ; Prod...
let test_multiple_run_node _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let exception_thrown = ref None in Test_io . ( test_run_wrapper " test_multiple_run_node " ( fun ( ) -> P . run_node node_config >>= fun ( ) -> catch ( fun (...
let test_get_remote_node_local_only _ = let module P = Distributed . Make ( Test_io ) ( M ) in let node_config = P . Local { P . Local_config . node_name = " test " ; } in let nonexistent_remote_node_result = ref ( Some " " ) in let self_remote_node_result = ref ( Some " " ) in let p ( ) = P . ( get_remote_node " test ...