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.
37 lines
833 B
Text
37 lines
833 B
Text
-- Tests the `monotonicity` tactic
|
|
|
|
/-
|
|
Should test that the tactic syntax is scoped, but cannot use #guard_msgs to catch “tactic not known”
|
|
errors, it seems:
|
|
|
|
/--
|
|
error: unsolved goals
|
|
⊢ True
|
|
-/
|
|
#guard_msgs in
|
|
example : True := by monotonicity
|
|
|
|
-/
|
|
|
|
open Lean.Order
|
|
|
|
example : monotone (fun (f : Nat → Option Unit) => do {do f 1; f 2; f 3}) := by
|
|
repeat monotonicity
|
|
|
|
example : monotone (fun (f : Option Unit) => do {do f; f; f}) := by
|
|
repeat monotonicity
|
|
|
|
example : monotone
|
|
(fun (f : Nat → Option Unit) => do
|
|
for x in [1,2,3] do f x : _ → Option _) := by
|
|
repeat' monotonicity
|
|
|
|
example : monotone
|
|
(fun (f : Nat → Option Nat) => do
|
|
let mut acc := 0
|
|
for x in [1,2,3] do
|
|
acc := acc + (← f x)
|
|
if acc > 10 then
|
|
return 5
|
|
pure acc : _ → Option _) := by
|
|
repeat' monotonicity
|