March Docs

Arcade.Test.Harness

Types

typeOutcomeOutcome = Passed(Int) | Drifted(Int, Int, Int) | Mismatch(String)#

How a case went. Passed counts the values that matched exactly. Drifted is Passed plus a measured, declared tolerance: differing of values were not bit-identical, the worst by max_ulps. It is for values that went through libm: mostly on JS (V8's libm), and rarely on native where a reference build merged sin and cos into one call (__sincos_stret). It is always printed. A case that compared nothing is a failure, so an empty golden table can never look green.

typeCaseCase = { name : String, run : () -> Outcome }#
typeTallyTally = {#

Functions

fnallall(outcomes : List(Outcome)) : Outcome#
fncasecase(name : String, run : () -> Outcome) : Case#
fndrift_ofdrift_of(results : List((String, Outcome))) : Int#
fnexpectexpect(ok : Bool, message : String) : Outcome#
fnexpect_intexpect_int(actual : Int, expected : Int, what : String) : Outcome#
fnexpect_stringexpect_string(actual : String, expected : String, what : String) : Outcome#
fnfailuresfailures(cases : List(Case)) : List(String)#
fnfailures_offailures_of(results : List((String, Outcome))) : List(String)#
fnon_json_js() : Bool#
fnpendingpending(suite : String) : ()#
fnprint_resultprint_result(r : (String, Outcome)) : ()#
fnreportreport(suite : String, cases : List(Case)) : ()#
fnrun_caserun_case(c : Case) : (String, Outcome)#
fntallytally(acc : Tally, o : Outcome) : Tally#
fnvalues_ofvalues_of(results : List((String, Outcome))) : Int#