This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
17 lines
397 B
Text
17 lines
397 B
Text
import Lean.Data.PersistentArray
|
||
|
||
def check [BEq α] (as : List α) : Bool :=
|
||
as.toPArray'.foldr (.::.) [] == as
|
||
|
||
def tst1 : IO Unit := do
|
||
assert! check [1, 2, 3]
|
||
assert! check ([] : List Nat)
|
||
assert! check (List.range 17)
|
||
assert! check (List.range 533)
|
||
assert! check (List.range 1000)
|
||
assert! check (List.range 2600)
|
||
IO.println "done"
|
||
|
||
/-- info: done -/
|
||
#guard_msgs in
|
||
#eval tst1
|