lean4-htt/tests/lean/interactive/outgoingCallHierarchy.lean
Marc Huisinga dfd3d18530
test: improve language server test coverage (#10574)
This PR significantly improves the test coverage of the language server,
providing at least a single basic test for every request that is used by
the client. It also implements infrastructure for testing all of these
requests, e.g. the ability to run interactive tests in a project context
and refactors the interactive test runner to be more maintainable.
Finally, it also fixes a small bug with the recently implemented unknown
identifier code actions for auto-implicits (#10442) that was discovered
in testing, where the "import all unambiguous unknown identifiers" code
action didn't work correctly on auto-implicit identifiers.
2025-09-30 11:15:03 +00:00

28 lines
671 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Lean.Server.Test.Refs
--^ waitForILeans
inductive Unit' where
| mk
inductive Sum' (α β) where
| left (a : α)
| right (b : β)
def foo : Unit' := .mk
def bar := foo
def foobar (s : Sum' α β) : Unit' :=
match s with
| .left _ => foo
| .right _ => bar
def barfoo (s : Sum' α β) := foobar s
--^ outgoingCallHierarchy
def test12 (_ : Lean.Server.Test.Refs.Test6) : Unit' := .mk
def test11 (s : Sum' α β) : Unit' :=
match s with
| .left _ => barfoo s
| .right _ => test12 Lean.Server.Test.Refs.test10
def test13 (s : Sum' α β) := test11 s
--^ outgoingCallHierarchy