-
Notifications
You must be signed in to change notification settings - Fork 858
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
fix tokenEnd and cursor for string, template, xml literals and comments when using multibyte characters #1745
Conversation
multiline comments when using multibyte characters
@@ -1208,6 +1212,41 @@ public void testParseUnicodeMultibyteCharacter() { | |||
AstNode first = ((ExpressionStatement) root.getFirstChild()).getExpression(); | |||
assertEquals("𠮷", first.getString()); | |||
} | |||
|
|||
@Test | |||
public void testParseMultibyteCharacter_StringLiteral() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no need to start the method name with 'test' as we have the annotation. Can you please change the names to use the same pattern as for the other test (in this file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the names, but 2 unit tests which were already there started with "test" (changed those as well)
@meraedit many thanks for this contribution. The spotless checks are failing because of some format violations. Please run './gradlew :tests:spotlessApply' to fix these violations |
Sorry @meraedit, still some spotless failures |
Thanks! I agree with @rbri 's comments, which you addressed, so thanks for fixing this! |
When using multibyte characters, the tokenEnd and cursor need to be adjusted otherwise the length of string, template, xml literals and comments is not correct.