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.
23 lines
631 B
Text
23 lines
631 B
Text
import Lean
|
|
|
|
#eval match true with | true => false | false => true
|
|
|
|
open Lean Elab Command Meta
|
|
#eval show CommandElabM Unit from do
|
|
match ([] : List Nat) with
|
|
| [] =>
|
|
liftCoreM <| addDecl <| Declaration.defnDecl {
|
|
name := `foo
|
|
type := Lean.mkConst ``Bool
|
|
levelParams := []
|
|
value := Lean.mkConst ``true
|
|
hints := .opaque
|
|
safety := .safe
|
|
}
|
|
| _ => return ()
|
|
|
|
#check foo
|
|
-- The auxiliary declarations created to elaborate the commands above
|
|
-- should not leak into the environment
|
|
#check _eval.match_1 -- Should fail
|
|
#check _eval.match_2 -- Should fail
|