1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859moduleQ=QCheck2moduleT=QCheck2.TestmoduleRaw=QCheck_base_runner.Rawletseed_=lazy(lets=tryint_of_string@@Sys.getenv"QCHECK_SEED"with_->Random.self_init();Random.int1_000_000_000inPrintf.printf"qcheck random seed: %d\n%!"s;s)letdefault_rand()=(* random seed, for repeatability of tests *)Random.State.make[|Lazy.forceseed_|]letverbose_=lazy(matchSys.getenv"QCHECK_VERBOSE"with|"1"|"true"->true|_->false|exceptionNot_found->false)letlong_=lazy(matchSys.getenv"QCHECK_LONG"with|"1"|"true"->true|_->false|exceptionNot_found->false)letto_alcotest?(colors=false)?(verbose=Lazy.forceverbose_)?(long=Lazy.forcelong_)?(debug_shrink=None)?debug_shrink_list?(speed_level=`Slow)?(rand=default_rand())(t:T.t)=letT.Testcell=tinlethandlernamecellr=matchr,debug_shrinkwith|QCheck2.Test.Shrunk(step,x),Someout->letgo=matchdebug_shrink_listwith|None->true|Sometest_list->List.memnametest_listinifnotgothen()elseQCheck_base_runner.debug_shrinking_choices~colors~out~namecell~stepx|_->()inletprint=Raw.print_stdinletname=T.get_namecellinletrun()=letcall=Raw.callback~colors~verbose~print_res:true~printinT.check_cell_exn~long~call~handler~randcellin((name,speed_level,run):unitAlcotest.test_case)