chore: improve test

This commit is contained in:
Leonardo de Moura 2023-07-11 10:01:32 -07:00 committed by Leonardo de Moura
parent 6d857a93b5
commit fd0549feb5
3 changed files with 8 additions and 1 deletions

View file

@ -49,4 +49,9 @@ def test (n : Nat) : CoreM Unit := do
}
return ()
#eval test 10000
def main (args : List String) : IO Unit := do
let [size] := args | throw (IO.userError s!"unexpected number of arguments, numeral expected")
initSearchPath (← findSysroot)
let env ← importModules [{ module := `Init.Prelude }] {} 0
discard <| test size.toNat! |>.toIO { fileName := "<test>", fileMap := default } { env }
IO.println "ok"

View file

@ -0,0 +1 @@
10000

View file

@ -0,0 +1 @@
ok