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.
40 lines
666 B
Lean4
40 lines
666 B
Lean4
set_option linter.deprecated true
|
|
|
|
def g (x : Nat) := x + 1
|
|
|
|
@[deprecated g]
|
|
def f (x : Nat) := x + 1
|
|
|
|
@[deprecated]
|
|
def h (x : Nat) := x + 1
|
|
|
|
#eval f 0 + 1
|
|
|
|
#eval h 0
|
|
|
|
@[deprecated g1]
|
|
def f1 (x : Nat) := x + 1
|
|
|
|
def Foo.g1 := 10
|
|
|
|
@[deprecated Foo.g1 (since := "2022-07-24")]
|
|
def f2 (x : Nat) := x + 1
|
|
|
|
@[deprecated g1]
|
|
def f3 (x : Nat) := x + 1
|
|
|
|
open Foo
|
|
@[deprecated g1 "use g1 instead, f4 is not a good name"]
|
|
def f4 (x : Nat) := x + 1
|
|
|
|
#eval f2 0 + 1
|
|
set_option linter.deprecated false in
|
|
#eval f2 0 + 1
|
|
#eval f4 0 + 1
|
|
|
|
@[deprecated] def Nat.z (x : Nat) := x + 1
|
|
|
|
/-- warning: `Nat.z` has been deprecated -/
|
|
#guard_msgs in
|
|
example (n : Nat) : n.z = n + 1 := rfl
|