lean4-htt/tests/lean/interactive/interactiveGoalGoToLoc.lean.expected.out
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

54 lines
2 KiB
Text

{"textDocument": {"uri": "file:///interactiveGoalGoToLoc.lean"},
"position": {"line": 14, "character": 2}}
{"goals":
[{"type":
{"tag": [{"subexprPos": "/", "info": {"p": "4"}}, {"text": "MyTrue"}]},
"mvarId": "[anonymous]",
"isRemoved": true,
"hyps":
[{"type":
{"tag": [{"subexprPos": "/", "info": {"p": "0"}}, {"text": "MyNat"}]},
"names": ["x"],
"fvarIds": []},
{"type":
{"tag":
[{"subexprPos": "/", "info": {"p": "1"}},
{"append":
[{"text": "MyEq "},
{"tag": [{"subexprPos": "/0/1", "info": {"p": "2"}}, {"text": "x"}]},
{"text": " "},
{"tag": [{"subexprPos": "/1", "info": {"p": "3"}}, {"text": "x"}]}]}]},
"names": ["h"],
"fvarIds": []}],
"goalPrefix": "⊢ ",
"ctx": {"p": "5"}}]}
GoToLoc responses for type of x:
GoToLoc response for MyNat:
{"kind": "definition", "info": {"p": "0"}}
[{"targetUri": "file:///interactiveGoalGoToLoc.lean",
"targetSelectionRange":
{"start": {"line": 1, "character": 10}, "end": {"line": 1, "character": 15}},
"targetRange":
{"start": {"line": 0, "character": 0}, "end": {"line": 3, "character": 24}}}]
GoToLoc responses for type of h:
GoToLoc response for MyEq x x:
{"kind": "definition", "info": {"p": "1"}}
[{"targetUri": "file:///interactiveGoalGoToLoc.lean",
"targetSelectionRange":
{"start": {"line": 9, "character": 10}, "end": {"line": 9, "character": 14}},
"targetRange":
{"start": {"line": 8, "character": 0}, "end": {"line": 10, "character": 27}}}]
GoToLoc response for x:
{"kind": "definition", "info": {"p": "2"}}
[]
GoToLoc response for x:
{"kind": "definition", "info": {"p": "3"}}
[]
GoToLoc responses for type of goal:
GoToLoc response for MyTrue:
{"kind": "definition", "info": {"p": "4"}}
[{"targetUri": "file:///interactiveGoalGoToLoc.lean",
"targetSelectionRange":
{"start": {"line": 6, "character": 10}, "end": {"line": 6, "character": 16}},
"targetRange":
{"start": {"line": 5, "character": 0}, "end": {"line": 6, "character": 29}}}]