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.
42 lines
1 KiB
Text
42 lines
1 KiB
Text
import Lean.LibrarySuggestions.Basic
|
|
|
|
-- Define some initial local constants
|
|
def myLocalDef : Nat := 42
|
|
|
|
theorem myLocalTheorem : myLocalDef = 42 := rfl
|
|
|
|
-- Add a theorem in the Lean namespace (should be filtered by isDeniedPremise)
|
|
namespace Lean
|
|
theorem shouldBeFiltered : True := trivial
|
|
end Lean
|
|
|
|
-- Test the currentFile selector (should only show theorems, not definitions)
|
|
set_library_suggestions Lean.LibrarySuggestions.currentFile
|
|
|
|
-- First test: should show only myLocalTheorem
|
|
-- (not myLocalDef since it's a def, not Lean.shouldBeFiltered since it's in Lean namespace)
|
|
/--
|
|
info: Library suggestions:
|
|
myLocalTheorem
|
|
-/
|
|
#guard_msgs in
|
|
example : True := by
|
|
suggestions
|
|
trivial
|
|
|
|
-- Add more local constants (mix of theorems and definitions)
|
|
theorem anotherTheorem : True := trivial
|
|
|
|
def myFunction (x : Nat) : Nat := x + 1
|
|
|
|
-- Second test: should show only the two theorems (not myFunction)
|
|
/--
|
|
info: Library suggestions:
|
|
myLocalTheorem
|
|
anotherTheorem
|
|
-/
|
|
#guard_msgs in
|
|
example : False → True := by
|
|
suggestions
|
|
intro h
|
|
trivial
|