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.
15 lines
576 B
Lean4
15 lines
576 B
Lean4
import Lean
|
|
|
|
noncomputable section
|
|
@[simp] def foo : Nat := 1
|
|
@[simp] noncomputable def bar : Nat := Classical.choice ⟨0⟩
|
|
@[simp] def baz : Nat := Classical.choice ⟨0⟩ -- `@[simp]` attribute doesn't get executed
|
|
|
|
open Lean Meta Elab Command
|
|
|
|
#eval liftCoreM <| do
|
|
let x1 := simpExtension.getState (← getEnv) |>.toUnfold.contains <| ``foo
|
|
let x2 := simpExtension.getState (← getEnv) |>.toUnfold.contains <| ``bar
|
|
let x3 := simpExtension.getState (← getEnv) |>.toUnfold.contains <| ``baz
|
|
logInfo m!"{x1} {x2} {x3}" -- should not return: "true true false".
|