Skip to content

Commit

Permalink
Improve variable naming in action templates test suite
Browse files Browse the repository at this point in the history
Signed-off-by: David Gregory <[email protected]>
  • Loading branch information
DavidGregory084 committed Jul 3, 2023
1 parent 9e1cabc commit 4553aa8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class TestActionTemplates {
}

@Test void testActionTemplateHeader(@TempDir Path tempDir) {
String sb =
String actionTemplates =
"normalizerImports() ::= <<\n" +
"import java.text.Normalizer;\n" +
"import java.text.Normalizer.Form;\n" +
Expand All @@ -89,9 +89,9 @@ public class TestActionTemplates {
"getText() ::= <<getText()>>\n" +
"setText(s) ::= <<setText(<s>);>>";

writeActionTemplatesFile(tempDir, sb);
writeActionTemplatesFile(tempDir, actionTemplates);

String actionTemplates = tempDir + FileSeparator + "Java.stg";
String actionTemplatesFile = tempDir + FileSeparator + "Java.stg";

String grammar =
"lexer grammar L;\n"+
Expand All @@ -103,7 +103,7 @@ public class TestActionTemplates {
"ID_CONTINUE: [\\p{XID_Continue}] ;\n"+
"WS : (' '|'\\n') -> skip ;";

State state = execLexer(grammar, "This _is \ufb01ne", tempDir, actionTemplates);
State state = execLexer(grammar, "This _is \ufb01ne", tempDir, actionTemplatesFile);

String expecting =
"[@0,0:3='This',<1>,1:0]\n"+
Expand Down

0 comments on commit 4553aa8

Please sign in to comment.