Skip to content

Commit

Permalink
change the names to use the same pattern as for the other test (in this
Browse files Browse the repository at this point in the history
file)
  • Loading branch information
meraedit committed Dec 2, 2024
1 parent 9d28e42 commit 45b8fa8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/test/java/org/mozilla/javascript/tests/ParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1207,22 +1207,22 @@ public void parseUnicodeFormatName() {
}

@Test
public void testParseUnicodeMultibyteCharacter() {
public void parseUnicodeMultibyteCharacter() {
AstRoot root = parse("\uD842\uDFB7");
AstNode first = ((ExpressionStatement) root.getFirstChild()).getExpression();
assertEquals("𠮷", first.getString());
}

@Test
public void testParseMultibyteCharacter_StringLiteral() {
public void parseMultibyteCharacter_StringLiteral() {
AstRoot root = parse("'\uD83C\uDF1F'");
StringLiteral first = (StringLiteral) ((ExpressionStatement) root.getFirstChild()).getExpression();
assertEquals(4, first.getLength());
assertEquals("'🌟'", first.getValue(true));
}

@Test
public void testParseMultibyteCharacter_TemplateLiteral() {
public void parseMultibyteCharacter_TemplateLiteral() {
AstRoot root = parse("`\uD83C\uDF1F`");
TemplateLiteral first = (TemplateLiteral) ((ExpressionStatement) root.getFirstChild()).getExpression();
TemplateCharacters templateCharacter = (TemplateCharacters) first.getElement(0);
Expand All @@ -1232,7 +1232,7 @@ public void testParseMultibyteCharacter_TemplateLiteral() {
}

@Test
public void testParseMultibyteCharacter_XMLLiteral() {
public void parseMultibyteCharacter_XMLLiteral() {
AstRoot root = parse("<xml>\uD83C\uDF1F</xml>");
XmlLiteral first = (XmlLiteral) ((ExpressionStatement) root.getFirstChild()).getExpression();
XmlFragment fragment = first.getFragments().get(0);
Expand All @@ -1241,15 +1241,15 @@ public void testParseMultibyteCharacter_XMLLiteral() {
}

@Test
public void testParseMultibyteCharacter_Comment() {
public void parseMultibyteCharacter_Comment() {
AstRoot root = parse("/*\uD83C\uDF1F*/");
Comment comment = root.getComments().first();
assertEquals(6, comment.getLength());
assertEquals("/*🌟*/", comment.getValue());
}

@Test
public void testParseUnicodeIdentifierPartWhichIsNotJavaIdentifierPart() {
public void parseUnicodeIdentifierPartWhichIsNotJavaIdentifierPart() {
// On the JDK 11 I'm using, Character.isUnicodeIdentifierPart(U+9FEB) returns true
// but Character.isJavaIdentifierPart(U+9FEB) returns false. On a JDK 17 results
// seem to vary, but I think it's enough to verify that TokenStream uses
Expand Down

0 comments on commit 45b8fa8

Please sign in to comment.