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.
22 lines
728 B
Lean4
22 lines
728 B
Lean4
/-! Kernel errors (via `Lean.Core.State.snapshotTasks`) should be backtracked. -/
|
||
|
||
structure Wrapper (α) where val : α
|
||
|
||
instance {α : Type} [NatCast α] : NatCast (Wrapper α) := sorry
|
||
|
||
def foo {α : Type} (μ : Wrapper α) (f : α → Nat) : Nat := sorry
|
||
|
||
macro:max P:term noWs "[" term "]" : term => `(foo $P fun x => 0)
|
||
|
||
/-! This used to give a kernel error even though there is a succeeding interpretation. -/
|
||
|
||
/-- warning: declaration uses `sorry` -/
|
||
#guard_msgs in
|
||
theorem kernel_error
|
||
(L : List Nat) (hL : L.length = 2 ∧ ∀ i : Fin L.length, L[i] = 0) (i : Nat) :
|
||
L[i % 2] = 0 := sorry
|
||
|
||
/-- info: 'kernel_error' depends on axioms: [propext, sorryAx, Quot.sound] -/
|
||
#guard_msgs in
|
||
#print axioms kernel_error
|