Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve SemanticTokensCommandTest #1513

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

0dinD
Copy link
Contributor

@0dinD 0dinD commented Jul 22, 2020

This PR improves the SemanticTokensCommandTest in the following ways:

  • Uses a "real" project with source files instead of using StringBuilder to generate source files.
  • Reduces code duplication in test cases by providing more helpful helper methods.
  • Adds a test case for semantic tokens in a class file from a library with attached source.

@fbricon does this PR address your comment on #1511? I was thinking about asserting that the source files had the same tokens as when compiled into class files, which feels like a more sturdy approach. However, as I am not too familiar with the Eclipse JDT APIs yet, I couldn't figure out an easy way to trigger a compile of the source files used in the test. If you know a way, I could implement that behavior, but maybe the test case for the library is good enough?

@fbricon fbricon merged commit b7f6cef into eclipse-jdtls:master Jul 22, 2020
@fbricon
Copy link
Contributor

fbricon commented Jul 22, 2020

Thanks @0dinD!

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