This PR migrates most remaining tests to the new test suite. It also completes the migration of directories like `tests/lean/run`, meaning that PRs trying to add tests to those old directories will now fail.
41 lines
991 B
Text
41 lines
991 B
Text
import Lean.ErrorExplanation
|
|
import Lean.Exception
|
|
import Lean.Log
|
|
|
|
/-!
|
|
# Error explanation interactive tests
|
|
|
|
Tests completions and hovers for error explanations.
|
|
-/
|
|
|
|
/-- Example -/
|
|
register_error_explanation testPkg.bar {
|
|
summary := "Error 0"
|
|
sinceVersion := "4.0.0"
|
|
}
|
|
|
|
/-- Example -/
|
|
register_error_explanation testPkg.foo1 {
|
|
summary := "Error 1"
|
|
sinceVersion := "4.0.0"
|
|
}
|
|
|
|
/-- Example -/
|
|
register_error_explanation testPkg.foo2 {
|
|
summary := "Error 2"
|
|
sinceVersion := "4.0.0"
|
|
}
|
|
|
|
#check throwNamedError testPkg
|
|
--^ completion
|
|
#check throwNamedError testPkg.
|
|
--^ completion
|
|
#check throwNamedError testPkg.f
|
|
--^ completion
|
|
#check throwNamedError testPkg.f "test"
|
|
--^ completion
|
|
|
|
#check throwNamedError testPkg.foo2
|
|
--^ textDocument/hover
|
|
#check throwNamedError testPkg.foo2 "test"
|
|
--^ textDocument/hover
|