-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed printing tokens - added two missing cases (#1675)
* Fixed printing tokens - added two missing cases * Added test for validating that _all_ tokens can be printed
- Loading branch information
1 parent
5b9ba19
commit 1477dfe
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.mozilla.javascript; | ||
|
||
import static org.junit.Assert.assertNotNull; | ||
import static org.mozilla.javascript.Token.FIRST_TOKEN; | ||
import static org.mozilla.javascript.Token.LAST_TOKEN; | ||
|
||
import org.junit.Test; | ||
|
||
public class TokenTest { | ||
@Test | ||
public void allTokensHaveAName() { | ||
for (int token = FIRST_TOKEN; token < LAST_TOKEN; ++token) { | ||
assertNotNull(Token.typeToName(token)); | ||
} | ||
} | ||
} |