Created
July 11, 2012 08:02
-
-
Save azusa/3088852 to your computer and use it in GitHub Desktop.
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
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class CharacterTest { | |
@Test | |
public void test() { | |
assertThat(Character.isJavaIdentifierPart('文'), is(true)); | |
assertThat(Character.isJavaIdentifierPart('_'), is(true)); | |
assertThat(Character.isJavaIdentifierPart('$'), is(true)); | |
assertThat(Character.isJavaIdentifierPart('#'), is(false)); | |
assertThat(Character.isJavaIdentifierPart('@'), is(false)); | |
assertThat(Character.isJavaIdentifierPart('、'), is(false)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment