text stringlengths 0 601k |
|---|
let vec3 = V . of_list [ ( " fatigue " , 99 . 0 ) ; ( " saucisse " , 42 . 0 ) ; ( " fatigue " , 100 . 0 ) ] |
let vec4 = V . of_list [ ( " fatigue " , 100 . 0 ) ; ( " saucisse " , 42 . 0 ) ; ( " fatigue " , 99 . 0 ) ] |
let vec5 = V . of_list [ ( " saucisse " , 42 . 0 . * 2 . ) ; ( " fatigue " , 100 . 0 . * 2 . ) ] |
let vec6 = V . of_list [ ( " saucisse " , 100 . ) ; ( " fatigue " , 42 . 0 ) ] |
let tests = [ ( Test . tztest_assert " refl " ` Quick @@ fun ( ) -> vec0 =:= vec0 ) ; ( Test . tztest_assert " neq1 " ` Quick @@ fun ( ) -> vec0 =/= vec1 ) ; ( Test . tztest_assert " of_list1 " ` Quick @@ fun ( ) -> vec0 =:= vec2 ) ; ( Test . tztest_assert " of_list2 " ` Quick @@ fun ( ) -> vec2 =:= vec3 ) ; ( Test . t... |
let success = ref 0 |
let failures = ref 0 |
let ( ) = let report ( ) = if ! failures = 0 then printf " Congratulation , all % d specification tests passed !\ n " ! success else printf " % d test % s passed , % d test % s failed . \ n " ! success ( if ! success > 1 then " s " else " " ) ! failures ( if ! failures > 1 then " s " else " " ) in at_exit report |
let test name md_string desired_md = try let md = Omd . of_string md_string in if md = desired_md then ( incr success ; ) else ( incr failures ; printf " % s : FAILURE \ n " name ; printf " input = % S \ nexpected = % S \ n result = % S \ n " md_string ( Omd_backend . sexpr_of_md desired_md ) ( Omd_backend . sexpr_of_m... |
let ( ) = let open Omd in test " Paragraph , simple " " Paragraph1 \ nline2 \ n \ nP2 \ n \ n \ nP3 " [ Paragraph [ Text " Paragraph1 " ; NL ; Text " line2 " ] ; Paragraph [ Text " P2 " ] ; Paragraph [ Text " P3 " ] ] ; test " Paragraph , blank line " " P1 \ n \ nP2 \ n \ t \ nP3 \ n " [ Omd . Paragraph [ Omd . Text " ... |
type instr = | Data | Command |
let boot_sequence = [ | 0xD5 ; 0xF0 ; 0x8D ; 0x14 ; 0xA1 ; 0xC8 ; 0x81 ; 0xCF ; 0xD9 ; 0xF1 ; 0xAF ; 0x20 ; 0x00 ] | cs = LOW ; dc = ( if instr = Data then HIGH else LOW ) ; data = d rst = HIGH ->> LOW ; cpt = 0 ->> ( cpt + 1 ) ; end_boot = ( cpt >= ( eval ( Array . length boot_sequence ) ) ) ; instr = merge end_boot D... |
let m ( ) = digital_write Arduboy . rst HIGH ; let program = program_boot ( ) in for i = 0 to 1000 do let ( cs , dc , rst , data , end_boot ) = program ( ) in digital_write Arduboy . cs cs ; digital_write Arduboy . dc dc ; Spi . transfer data done |
let ( ) = Arduboy . init ( ) ; Spi . begin_spi ~ ss : SS ~ sck : SCK ~ mosi : MOSI ; m ( ) |
type abc = [ ` Aye | ` Bee | ` Cee ] |
let string_of_abc = function | ` Aye -> " aye " | ` Bee -> " bee " | ` Cee -> " cee " |
let abc_of_string = function | " aye " -> Ok ` Aye | " bee " -> Ok ` Bee | " cee " -> Ok ` Cee | _ -> Error " abc_of_string " |
module Q = struct open Caqti_type . Std open Caqti_request . Infix let select_null_etc = tup2 ( option int ) ( option int ) -->! tup2 bool ( option int ) @:- " SELECT ? IS NULL , " ? let select_and = tup2 bool bool -->! bool @:- " SELECT ? AND " ? let select_plus_int = tup2 int int -->! int @:- " SELECT ? + " ? let sel... |
module Make ( Ground : Testlib . Sig . Ground ) = struct open Ground let repeat n f = let rec loop i = if i = n then return ( ) else f i >>= fun ( ) -> loop ( i + 1 ) in loop 0 let env _ = let open Caqti_query in function | " x1 " -> L " 734 " | " x2 " -> Q " I ' m quoted . " | _ -> raise Not_found let test_expand ( mo... |
module Req = struct include Caqti_type . Std include Caqti_request . Infix end |
let create_req = Req . ( unit . --> unit @:- " CREATE TABLE tmp ( integer primary key not null ) " ) |
let bad_insert_req = Req . ( unit -->! unit @:- " INSERT INTO tmp VALUES ( 1 ) , ( 1 ) " ) |
let test_error ( module C : Caqti_blocking . CONNECTION ) = C . exec create_req ( ) |> Result . iter_error ( Alcotest . failf " % a " Caqti_error . pp ) ; ( match C . find bad_insert_req ( ) with | Ok ( ) -> Alcotest . fail " unexpected ok from bad_insert " | Error ( ` Response_failed { msg = Caqti_driver_sqlite3 . Err... |
let test_cases_on_connection = [ " test_error " , ` Quick , test_error ; ] |
let mk_test ( name , pool ) = let pass_conn ( name , speed , f ) = let f ' ( ) = Caqti_blocking . Pool . use ( fun c -> Ok ( f c ) ) pool |> function | Ok ( ) -> ( ) | Error err -> Alcotest . failf " % a " Caqti_error . pp err in ( name , speed , f ' ) in let test_cases = List . map pass_conn test_cases_on_connection i... |
let mk_tests { uris ; tweaks_version } = let connect_pool uri = ( match Caqti_blocking . connect_pool uri ~ max_size : 1 ? tweaks_version with | Ok pool -> ( test_name_of_uri uri , pool ) | Error err -> raise ( Caqti_error . Exn err ) ) in let is_sqlite3 uri = Uri . scheme uri = Some " sqlite3 " in let pools = List . m... |
let ( ) = Alcotest_cli . run_with_args_dependency " test_sqlite3 " common_args mk_tests |
let sexp_of_int = Core_kernel . Core_kernel_stable . sexp_of_int in let r = Int_conversions . sexp_of_int_style in let old = ! r in r := ` Underscores ; print_s [ % sexp ( 1234 : int ) ] ; [ % expect { | 1_234 } ] ; | r := ` No_underscores ; print_s [ % sexp ( 1234 : int ) ] ; [ % expect { | 1234 } ] ; | r := old ; ; l... |
module Hashtbl = struct let % test_module " Hashtbl . V1 " = ( module Stable_unit_test . Make_unordered_container ( struct module Hashable = Core_kernel_stable . Hashable . V1 . Make ( Int ) module Table = Hashable . Table type t = string Table . t [ @@ deriving sexp , bin_io ] let equal t1 t2 = Int . Table . equal Str... |
module Map = struct module V1 ( Key : sig type t [ @@ deriving bin_io , sexp ] include Comparator . S with type t := t end ) : sig type ' a t = ( Key . t , ' a , Key . comparator_witness ) Map . t include Stable1 with type ' a t := ' a t end = Map . Stable . V1 . Make ( struct include Key let compare = comparator . com... |
module Set = struct module type F = functor ( Elt : Stable ) -> sig type t = ( Elt . t , Elt . comparator_witness ) Set . t [ @@ deriving sexp , bin_io , compare ] end module Test ( F : F ) = Stable_unit_test . Make ( struct include F ( Int ) let equal = Set . equal let tests = [ ( Int . Set . of_list ( List . init 10 ... |
module Debug ( Stack : S ) : S with type ' a t = ' a Stack . t = struct open Stack type nonrec ' a t = ' a t let invariant = invariant let check_and_return t = invariant ignore t ; t ; ; let debug t f = let result = Result . try_with f in invariant ignore t ; Result . ok_exn result ; ; let clear t : unit = debug t ( fu... |
module Test ( Stack : S ) : S with type ' a t = ' a Stack . t = struct open Stack type nonrec ' a t = ' a t include Test_container . Test_S1 ( Stack ) let invariant = invariant let create = create let is_empty = is_empty let top_exn = top_exn let pop_exn = pop_exn let pop = pop let top = top let singleton = singleton l... |
let assert_ok rc = assert ( rc = Rc . OK ) OK |
let assert_done rc = assert ( rc = Rc . DONE ) DONE |
let column_decltype s i = match column_decltype s i with | None -> " < NONE " > | Some str -> str |
let stepbystep s = assert_done ( iter s ~ f ( : function r -> Array . iteri ( fun i c -> printf " % s column [ column % d ] d % s = % s \ n " %! ( column_decltype s i ) i i ( column_name s i ) i ( Data . to_string_coerce c ) c ) c r ) r ) r |
let stepbystep_wrong s = while step s = Rc . ROW do for i = 0 to data_count s do printf " % s column [ column % d ] d % s = % s \ n " %! ( column_decltype s i ) i i ( column_name s i ) i ( Data . to_string_coerce ( column s i ) i ) i done done |
let mk_tbl db id = let sql = sprintf " CREATE TABLE tbl % d ( a varchar ( varchar1 ) varchar1 , b INTEGER , c FLOAT ) FLOAT " id in Rc . check ( exec db sql ) sql ; let sql = sprintf " INSERT INTO tbl % d VALUES ( ' a ' , 3 , 3 . 14 ) 14 " id in Rc . check ( exec db sql ) sql let db = db_open " t_stmt " in mk_tbl db 0 ... |
module Int32 = struct type t = int32 let encoding = Data_encoding . int32 module Index = struct type t = int let path_length = 1 let to_path c l = string_of_int c :: l let of_path = function | [ ] | _ :: _ :: _ -> None | [ c ] -> int_of_string_opt c type ' a ipath = ' a * t let args = Storage_description . One { rpc_ar... |
module Int64 = struct type t = int64 let encoding = Data_encoding . int64 module Index = struct type t = int64 let path_length = 1 let to_path c l = Int64 . to_string c :: l let of_path = function | [ ] | _ :: _ :: _ -> None | [ c ] -> Int64 . of_string_opt c type ' a ipath = ' a * t let args = Storage_description . On... |
let create_context name : ( module Raw_context . T with type t = Raw_context . t ) = ( module Make_subcontext ( Registered ) ( Raw_context ) ( struct let name = [ name ] end ) ) |
let create_subcontext name ( module Context : Raw_context . T with type t = Raw_context . t ) : ( module Raw_context . T with type t = Raw_context . t ) = ( module Make_subcontext ( Registered ) ( Context ) ( struct let name = [ name ] end ) ) |
let create_single_data_storage name ( module Context : Raw_context . T with type t = Raw_context . t ) : ( module Single_data_storage with type t = Context . t and type value = Int32 . t ) = ( module Make_single_data_storage ( Registered ) ( Context ) ( struct let name = [ name ] end ) ( Int32 ) ) |
let create_indexed_subcontext_int32 ( module Context : Raw_context . T with type t = Raw_context . t ) : ( module Data_set_storage with type t = Raw_context . t ) = ( module Make_data_set_storage ( Context ) ( Int32 . Index ) ) |
let create_indexed_subcontext_int64 ( module Context : Raw_context . T with type t = Raw_context . t ) : ( module Data_set_storage with type t = Raw_context . t ) = ( module Make_data_set_storage ( Context ) ( Int64 . Index ) ) |
let must_failwith f_prog error = try let _ = f_prog ( ) in Alcotest . fail " Unexpected successful result " with exc -> if exc = error then Lwt . return_unit else Alcotest . fail " Unexpected error result " |
let test_register_single_data ( ) = let f_prog ( ) = let context = create_context " context1 " in let _single_data = create_single_data_storage " single_data " context in create_single_data_storage " single_data " context in let error = Invalid_argument " Could not register a value at [ context1 / single_data ] because... |
let test_register_named_subcontext ( ) = let f_prog ( ) = let context = create_context " context2 " in let subcontext = create_subcontext " sub_context " context in let _single_data = create_single_data_storage " error_register " subcontext in let subcontext = create_subcontext " error_register " subcontext in create_s... |
let test_register_indexed_subcontext ( ) = let f_prog ( ) = let context = create_context " context3 " in let _ = create_single_data_storage " single_value " context in create_indexed_subcontext_int32 context in let error = Invalid_argument " Could not register an indexed subcontext at [ context3 ] because of an \ exist... |
let test_register_indexed_subcontext_2 ( ) = let f_prog ( ) = let context = create_context " context4 " in let _ = create_indexed_subcontext_int32 context in create_indexed_subcontext_int64 context in let error = Invalid_argument " An indexed subcontext at [ context4 ] already exists but has a different \ argument : ` ... |
let tests = [ Alcotest_lwt . test_case " register single data in existing path " ` Quick ( fun _ -> test_register_single_data ) ; Alcotest_lwt . test_case " register named subcontext in existing path " ` Quick ( fun _ -> test_register_named_subcontext ) ; Alcotest_lwt . test_case " register indexed subcontext in existi... |
module Int32 = struct type t = int32 let encoding = Data_encoding . int32 module Index = struct type t = int let path_length = 1 let to_path c l = string_of_int c :: l let of_path = function | [ ] | _ :: _ :: _ -> None | [ c ] -> int_of_string_opt c type ' a ipath = ' a * t let args = Storage_description . One { rpc_ar... |
module String = struct type t = string let encoding = Data_encoding . string end |
module Root_raw_context = Make_subcontext ( Registered ) ( Raw_context ) ( struct let name = [ " test_storage_functors " ] end ) |
module Indexed_context = Make_indexed_subcontext ( Make_subcontext ( Registered ) ( Root_raw_context ) ( struct let name = [ " index " ] end ) ) ( Int32 . Index ) |
module Table = Make_carbonated_data_set_storage ( Make_subcontext ( Registered ) ( Raw_context ) ( struct let name = [ " table " ] end ) ) ( Int32 . Index ) |
let wrap m = m >|= Environment . wrap_tzresult |
let test_fold_keys_unaccounted ( ) = let open Lwt_tzresult_syntax in let * ctxt = Context . default_raw_context ( ) in let * ( ctxt , _ ) = wrap ( Table . init ctxt 1 ) in let * ( ctxt , _ ) = wrap ( Table . init ctxt 2 ) in let *! items = Table . fold_keys_unaccounted ctxt ~ order ` : Undefined ~ f ( : fun x acc -> Lw... |
let tests = [ Tztest . tztest " fold_keys_unaccounted smoke test " ` Quick test_fold_keys_unaccounted ; ] |
let test_init _ = return_unit |
let test_cycles store = let open Lwt_result_syntax in let chain_store = Store . main_chain_store store in let * blocks = List . fold_left_es ( fun acc _ -> let * ( blocks , _head ) = append_cycle ~ should_set_head : true chain_store in return ( blocks @ acc ) ) [ ] ( 1 -- 10 ) in assert_presence_in_store chain_store bl... |
let test_cases = let wrap_test ( s , f ) = let f _ = f in wrap_test ( s , f ) in List . map wrap_test [ ( " initialisation " , test_init ) ; ( " store cycles " , test_cycles ) ] |
let rec compare_path is_eq p1 p2 = match ( p1 , p2 ) with | ( [ ] , [ ] ) -> true | ( h1 :: p1 , h2 :: p2 ) -> is_eq h1 h2 && compare_path is_eq p1 p2 | _ -> false |
let vblock tbl k = Nametbl . find tbl k |> WithExceptions . Option . to_exn ~ none : Not_found |
let pp_print_list fmt l = Format . fprintf fmt " [ @< h >% a ] " @ ( Format . pp_print_list ~ pp_sep : Format . pp_print_space Block_hash . pp_short ) ( List . map Store . Block . hash l ) |
let test_path chain_store tbl = let open Lwt_syntax in let check_path h1 h2 p2 = let * o = Store . Chain_traversal . path chain_store ~ from_block ( : vblock tbl h1 ) ~ to_block ( : vblock tbl h2 ) in match o with | None -> Assert . fail_msg " cannot compute path % s -> % s " h1 h2 | Some ( p : Store . Block . t list )... |
let test_ancestor chain_store tbl = let open Lwt_syntax in let check_ancestor h1 h2 expected = let * o = Store . Chain_traversal . common_ancestor chain_store ( vblock tbl h1 ) ( vblock tbl h2 ) in match o with | None -> Assert . fail_msg " not ancestor found " | Some a -> if not ( Block_hash . equal ( Store . Block . ... |
let seed = let receiver_id = P2p_peer . Id . of_string_exn ( String . make P2p_peer . Id . size ' r ' ) in let sender_id = P2p_peer . Id . of_string_exn ( String . make P2p_peer . Id . size ' s ' ) in { Block_locator . receiver_id ; sender_id } |
let iter2_exn f l1 l2 = List . iter2 ~ when_different_lengths ( : Failure " iter2_exn " ) f l1 l2 |> function | Ok ( ) -> ( ) | _ -> assert false |
let test_locator chain_store tbl = let open Lwt_syntax in let check_locator length h1 expected = let * { Block_locator . history ; _ } = Store . Chain . compute_locator chain_store ~ max_size : length ( vblock tbl h1 ) seed in if Compare . List_lengths . ( history <> expected ) then Assert . fail_msg " Invalid locator ... |
let compare s name heads l = List . iter ( fun b -> Format . printf " % s . " @ ( rev_lookup b s ) ) heads ; if Compare . List_lengths . ( heads <> l ) then Assert . fail_msg " unexpected known_heads size ( % s : % d % d ) " name ( List . length heads ) ( List . length l ) ; List . iter ( fun bname -> let hash = Store ... |
let test_known_heads chain_store tbl = let open Lwt_result_syntax in let *! heads = Store . Chain . known_heads chain_store in let heads = List . map fst heads in compare tbl " initial " heads [ " Genesis " ] ; let * _ = Store . Chain . set_head chain_store ( vblock tbl " A8 " ) in let * _ = Store . Chain . set_head ch... |
let test_head chain_store tbl = let open Lwt_result_syntax in let *! head = Store . Chain . current_head chain_store in let *! genesis_block = Store . Chain . genesis_block chain_store in if not ( Store . Block . equal head genesis_block ) then Assert . fail_msg " unexpected head " ; let * o = Store . Chain . set_head ... |
let test_mem chain_store tbl = let open Lwt_result_syntax in let mem x = let b = vblock tbl x in let b_descr = Store . Block . ( hash b , level b ) in Store . Chain . is_in_chain chain_store b_descr in let test_mem x = let *! b = mem x in match b with true -> Lwt . return_unit | false -> Assert . fail_msg " mem % s " x... |
let test_new_blocks chain_store tbl = let open Lwt_syntax in let test head h expected_ancestor expected = let to_block = vblock tbl head and from_block = vblock tbl h in let * ( ancestor , blocks ) = Store . Chain_traversal . new_blocks chain_store ~ from_block ~ to_block in if not ( Block_hash . equal ( Store . Block ... |
let test_basic_checkpoint chain_store table = let open Lwt_result_syntax in let block = vblock table " A1 " in let * _prev_head = Store . Chain . set_head chain_store block in let * ( ) = Store . Chain . set_target chain_store ( Store . Block . hash block , Store . Block . level block ) in let *! ( c_block , c_level ) ... |
let test_acceptable_block chain_store table = let open Lwt_result_syntax in let block = vblock table " A2 " in let block_hash = Store . Block . hash block in let level = Store . Block . level block in let * _prev_head = Store . Chain . set_head chain_store block in let * ( ) = Store . Chain . set_target chain_store ( b... |
let test_is_valid_target chain_store table = let open Lwt_result_syntax in let block = vblock table " A2 " in let block_hash = Store . Block . hash block in let level = Store . Block . level block in let * _prev_head = Store . Chain . set_head chain_store block in let * ( ) = Store . Chain . set_target chain_store ( bl... |
let test_best_know_head_for_checkpoint chain_store table = let open Lwt_result_syntax in let block = vblock table " A2 " in let block_hash = Store . Block . hash block in let level = Store . Block . level block in let checkpoint = ( block_hash , level ) in let * _prev_head = Store . Chain . set_head chain_store block i... |
let test_future_target chain_store _ = let open Lwt_result_syntax in let *! genesis_block = Store . Chain . genesis_block chain_store in let genesis_descr = Store . Block . descriptor genesis_block in let *! ( bad_chain , bad_head ) = make_raw_block_list genesis_descr 5 in let *! ( good_chain , good_head ) = make_raw_b... |
let test_reach_target chain_store table = let open Lwt_result_syntax in let mem x = let b = vblock table x in Store . Chain . is_in_chain chain_store Store . Block . ( hash b , level b ) in let test_mem x = let *! b = mem x in match b with true -> Lwt . return_unit | false -> Assert . fail_msg " mem % s " x in let test... |
let test_not_may_update_target chain_store table = let open Lwt_result_syntax in let block_a2 = vblock table " A2 " in let target_hash = Store . Block . hash block_a2 in let target_level = Store . Block . level block_a2 in let target = ( target_hash , target_level ) in let * _pred_head = Store . Chain . set_head chain_... |
let testable_hash = Alcotest . testable ( fun fmt h -> Format . fprintf fmt " % s " ( Block_hash . to_b58check h ) ) Block_hash . equal |
let init_block_of_identifier_test chain_store table = let open Lwt_result_syntax in let + _ = vblock table " A8 " |> Store . Chain . set_head chain_store in ( ) |
let vblock_hash table name = vblock table name |> Store . Block . hash |
let assert_successful_block_of_identifier ( ? init = init_block_of_identifier_test ) ~ input ~ expected chain_store table = let open Lwt_result_syntax in let * _ = init chain_store table in let + found = Store . Chain . block_of_identifier chain_store input in Alcotest . check testable_hash " same block hash " expected... |
let assert_failing_block_of_identifier ( ? init = init_block_of_identifier_test ) ~ input chain_store table = let open Lwt_result_syntax in let * _ = init chain_store table in let *! r = Store . Chain . block_of_identifier chain_store input in match r with | Ok b -> Assert . fail_msg ~ given ( : Store . Block . hash b ... |
let test_block_of_identifier_success_block_from_level chain_store table = let a5 = vblock table " A5 " in assert_successful_block_of_identifier ~ input ( ` : Level ( Store . Block . level a5 ) ) ~ expected ( : Store . Block . hash a5 ) chain_store table |
let test_block_of_identifier_success_block_from_hash chain_store table = let a5_hash = vblock_hash table " A5 " in assert_successful_block_of_identifier ~ input ( ` : Hash ( a5_hash , 0 ) ) ~ expected : a5_hash chain_store table |
let test_block_of_identifier_success_block_from_hash_predecessor chain_store table = assert_successful_block_of_identifier ~ input ( ` : Hash ( vblock_hash table " A5 " , 2 ) ) ~ expected ( : vblock_hash table " A3 " ) chain_store table |
let test_block_of_identifier_success_block_from_hash_successor chain_store table = assert_successful_block_of_identifier ~ input ( ` : Hash ( vblock_hash table " A5 " , - 2 ) ) ~ expected ( : vblock_hash table " A7 " ) chain_store table |
let test_block_of_identifier_success_caboose chain_store table = assert_successful_block_of_identifier ~ input ( ` : Alias ( ` Caboose , 0 ) ) ~ expected ( : vblock_hash table " Genesis " ) chain_store table |
let test_block_of_identifier_success_caboose_successor chain_store table = assert_successful_block_of_identifier ~ input ( ` : Alias ( ` Caboose , - 2 ) ) ~ expected ( : vblock_hash table " A2 " ) chain_store table |
let test_block_of_identifier_failure_caboose_predecessor chain_store table = assert_failing_block_of_identifier ~ input ( ` : Alias ( ` Caboose , 2 ) ) chain_store table |
let test_block_of_identifier_success_checkpoint chain_store table = let open Lwt_result_syntax in let a5 = vblock table " A5 " in let a5_hash = Store . Block . hash a5 in let a5_descriptor = ( a5_hash , Store . Block . level a5 ) in assert_successful_block_of_identifier ~ init ( : fun cs t -> let * _ = init_block_of_id... |
let test_block_of_identifier_success_checkpoint_predecessor chain_store table = let open Lwt_result_syntax in let a5 = vblock table " A5 " in let a5_hash = Store . Block . hash a5 in let a5_descriptor = ( a5_hash , Store . Block . level a5 ) in assert_successful_block_of_identifier ~ init ( : fun cs t -> let * _ = init... |
let test_block_of_identifier_success_checkpoint_successor chain_store table = let open Lwt_result_syntax in let a5 = vblock table " A5 " in let a5_hash = Store . Block . hash a5 in let a5_descriptor = ( a5_hash , Store . Block . level a5 ) in assert_successful_block_of_identifier ~ init ( : fun cs t -> let * _ = init_b... |
let test_block_of_identifier_failure_checkpoint_successor chain_store table = let open Lwt_result_syntax in let a5 = vblock table " A5 " in let a5_hash = Store . Block . hash a5 in let a5_descriptor = ( a5_hash , Store . Block . level a5 ) in assert_failing_block_of_identifier ~ init ( : fun cs t -> let * _ = init_bloc... |
let test_block_of_identifier_success_savepoint chain_store table = assert_successful_block_of_identifier ~ input ( ` : Alias ( ` Savepoint , 0 ) ) ~ expected ( : vblock_hash table " Genesis " ) chain_store table |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.