Test.budget: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/ez/test.bend as Test Lines 106-118 of ezx@1.11.0.0/src/ez/test.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/ez/test.bend&start_line=106&end_line=118 import Base # the budget checked the way every other thing here is checked. A run that # overran is a run that failed, and it says so in the count rather than merely # taking a long time. def budget(late: Bool, +secs: String, score: Tally) -> IO(Tally): match late: case False{}: IO.pure(Tally, score) case True{}: do IO: IO.write("FAIL: the gate took longer than its " ++ secs ++ " second " ++ "budget\n set EZ_DEADLINE higher if this tree honestly needs " ++ "longer, or to 0 to stop asking\n") return tally(False{}, score) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.write https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ez/test.bend&name=Tally https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ez/test.bend&name=tally