mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
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.
41 lines
609 B
Lean4
41 lines
609 B
Lean4
import Lean
|
|
set_option trace.Meta.debug true
|
|
class W where
|
|
/-- w -/
|
|
w : Unit
|
|
|
|
class X extends W where
|
|
/-- x -/
|
|
x : Unit
|
|
|
|
class Y extends W where
|
|
/-- y -/
|
|
y : Unit
|
|
|
|
class Y' extends Y where
|
|
/-- h -/
|
|
h : Unit
|
|
|
|
class Z extends X, Y'
|
|
|
|
open Lean
|
|
def test (declName : Name) : CoreM Unit := do
|
|
let some docstr ← findDocString? (← getEnv) declName | throwError "docstring not found"
|
|
IO.println docstr
|
|
|
|
/-- info: w -/
|
|
#guard_msgs in
|
|
#eval test ``W.w
|
|
|
|
/-- info: x -/
|
|
#guard_msgs in
|
|
#eval test ``X.x
|
|
|
|
/-- info: y -/
|
|
#guard_msgs in
|
|
#eval test ``Z.y
|
|
|
|
/-- info: h -/
|
|
#guard_msgs in
|
|
#eval test ``Z.h
|