Skip to content

Add LSP hover integration test coverage for literals, constructors, methods, and this#5108

Merged
orien merged 3 commits intomainfrom
pony-lsp-test
Apr 4, 2026
Merged

Add LSP hover integration test coverage for literals, constructors, methods, and this#5108
orien merged 3 commits intomainfrom
pony-lsp-test

Conversation

@orien
Copy link
Copy Markdown
Member

@orien orien commented Apr 4, 2026

Context

The existing hover integration tests cover top-level entity declarations but are missing tests for constructors, method declarations, fun ref receivers, this, parameters, and literal values. The test classes and shared server are named after the workspace fixture directory rather than their role.

Changes

  • Adds _literals.pony fixture and hover/integration/literals test, covering integer, hex, binary, float, string, character, and boolean literals — asserting no hover result for literal values and correct type strings for their variable declarations
  • Adds constructor hover to the class test; moves method declaration hover to the function test where it belongs
  • Adds a fun ref method to _function.pony and tests its declaration hover; adds this-reference checks (no hover) in the function test
  • Moves h.long_test() into _HoverLspServer.hover() so individual tests don't need to call it
  • Improves the null-result failure message to show expected strings rather than raw JSON
  • Renames test classes from _HoverWorkspace* to _HoverIntegration* and the shared server to _HoverLspServer

Continues on from #5106 and #5107.

orien added 3 commits April 4, 2026 15:54
Adds a dedicated _literals.pony fixture and test covering integer, hex,
binary, float, string, character, and boolean literals — asserting no
hover result is returned for literal values. Adds constructor and method
declaration hover checks to the class test, behavior hover to the actor
test, and a this-reference check (also no hover). Improves the null-
result error message to show expected strings rather than raw JSON.
Renames _HoverWorkspace* test classes to _HoverIntegration* and
_HoverWorkspaceServer to _HoverLspServer.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Apr 4, 2026
@orien orien merged commit 0e6215e into main Apr 4, 2026
14 checks passed
@orien orien deleted the pony-lsp-test branch April 4, 2026 05:15
@ponylang-main ponylang-main added discuss during sync Should be discussed during an upcoming sync and removed discuss during sync Should be discussed during an upcoming sync labels Apr 4, 2026
@orien orien removed the discuss during sync Should be discussed during an upcoming sync label Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants