Make Char.category and directionality properties instead of functions.

Provide contains(Char) operator for CharCategory.
This commit is contained in:
Ilya Gorbunov
2015-11-18 21:39:10 +03:00
parent 775755dfac
commit b61bef324d
3 changed files with 26 additions and 6 deletions
+6 -4
View File
@@ -6,10 +6,12 @@ import org.junit.Test as test
class CharJVMTest {
@test fun getCategory() {
assertEquals(CharCategory.DECIMAL_DIGIT_NUMBER, '7'.category())
assertEquals(CharCategory.CURRENCY_SYMBOL, '$'.category())
assertEquals(CharCategory.LOWERCASE_LETTER, 'a'.category())
assertEquals(CharCategory.UPPERCASE_LETTER, 'Õ'.category())
assertEquals(CharCategory.DECIMAL_DIGIT_NUMBER, '7'.category)
assertEquals(CharCategory.CURRENCY_SYMBOL, '$'.category)
assertEquals(CharCategory.LOWERCASE_LETTER, 'a'.category)
assertEquals(CharCategory.UPPERCASE_LETTER, 'Õ'.category)
assertTrue(',' in CharCategory.OTHER_PUNCTUATION)
}
}