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
489 B
Text
22 lines
489 B
Text
import Lean
|
||
open Lean Elab
|
||
|
||
declare_syntax_cat fixDecl
|
||
syntax ident : fixDecl
|
||
syntax ident "<" term : fixDecl
|
||
|
||
syntax "Fix₁ " fixDecl : tactic
|
||
|
||
elab_rules : tactic
|
||
| `(tactic| Fix₁ $x:ident) => logInfo "simple"
|
||
|
||
elab_rules : tactic
|
||
| `(tactic| Fix₁ $x:ident < $bound:term) =>
|
||
throwError "Failed at elab_rules"
|
||
|
||
macro_rules
|
||
| `(ℕ) => `(Nat)
|
||
|
||
example : ∀ b : ℕ, ∀ a : Nat, a ≥ 2 → a / a = 1 := by
|
||
Fix₁ b
|
||
Fix₁ a < 2 -- should produce `Failed at elab_rules`
|