lean4-htt/tests/server_interactive/errorExplanationInteractive.lean
Garmelon a3cb39eac9
chore: migrate more tests to new test suite (#12809)
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.
2026-03-06 16:52:01 +00:00

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