Skip to content

#168 Add Java port Whitebox and Expr tests#170

Merged
mike-lischke merged 4 commits intomike-lischke:mainfrom
vityaman:168
Mar 28, 2025
Merged

#168 Add Java port Whitebox and Expr tests#170
mike-lischke merged 4 commits intomike-lischke:mainfrom
vityaman:168

Conversation

@vityaman
Copy link
Copy Markdown
Contributor

@vityaman vityaman commented Feb 13, 2025

  • Added VSCode Devcontaner configuration
  • Translated Whitebox tests from TypeScript to Java using an LLM.
  • Translated Expr tests from TypeScript to Java using an LLM.
  • Translated CodeCompletionCore from TypeScript to Java using an LLM.
  • Fix a bug with a ignoredToken dependency at followSet computation

Signed-off-by: vityaman <vityaman.dev@yandex.ru>
Signed-off-by: vityaman <vityaman.dev@yandex.ru>
@vityaman
Copy link
Copy Markdown
Contributor Author

As we see, tests are failed, so bug hunting is required in Java port. I will work slowly on this during the next days when I will have a free time.

@mike-lischke
Copy link
Copy Markdown
Owner

Keep in mind the Java port might not be up to date. If the tests return different values you will have to check that the Java code behaves like the TS code.

Signed-off-by: vityaman <vityaman.dev@yandex.ru>
Signed-off-by: vityaman <vityaman.dev@yandex.ru>
System.out.println();
System.out.println("simpleExpressionTest");

@Order(1)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I faced with that bug that test results depends on an order of execution. This is becase followSets caching is ignoredTokens aware. I forgot about it, but is actually already fixed in C++ port: https://github.com/mike-lischke/antlr4-c3/blob/main/ports/cpp/source/antlr4-c3/CodeCompletionCore.cpp#L135

Copy link
Copy Markdown
Contributor Author

@vityaman vityaman Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we actually can merge this now and I will

  • fix this bug at all exiting ports
  • setup GitHub Actions to run tests in a shuffled order to catch such bugs

--

@vityaman vityaman marked this pull request as ready for review March 27, 2025 11:39
@vityaman vityaman changed the title #168 Add Java port Whitebox test #168 Add Java port Whitebox and Expr tests Mar 27, 2025
@mike-lischke mike-lischke merged commit e542df5 into mike-lischke:main Mar 28, 2025
2 checks passed
@mike-lischke
Copy link
Copy Markdown
Owner

Thank you @vityaman

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