--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/RegressionTests__CharacterTests.st Mon Mar 01 21:55:43 2004 +0100
@@ -0,0 +1,62 @@
+"{ Package: 'exept:regression' }"
+
+TestCase subclass:#CharacterTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Collections-Text-Encodings'
+!
+
+
+!CharacterTests methodsFor:'tests'!
+
+test01CaseTesting
+ CharacterEncoderCodeGenerator new
+ readingUnicodeDataFrom:'/phys/exept/home/documentation/standards/unicode/UnicodeData-3.1.0.txt' asFilename readStream
+ do:[:codePoint :name :category :canOrd :bidiCat :decMap
+ :decDigitValue :digitValue :numValue
+ :mirrored :unicodeName :comment :ucValue :lcValue :tcValue |
+ |ch ucCh lcCh tcCh isUppercase isLowercase isTitlecase isLetter dToUc dToLc|
+
+ isUppercase := category = 'Lu'.
+ isLowercase := category = 'Ll'.
+ isTitlecase := category = 'Lt'.
+ isLetter := isUppercase | isLowercase | isTitlecase
+ or:[(category = 'Lm') or:[(category = 'Lo')]].
+
+ ch := Character value:codePoint.
+ self assert:(ch isUppercase == isUppercase).
+ self assert:(ch isLowercase == isLowercase).
+ "/ self assert:(ch isTitlecase == isTitlecase).
+ self assert:(ch isNationalLetter == isLetter).
+
+ ucValue notNil ifTrue:[
+ ucCh := Character value:ucValue.
+ self assert:(ch asUppercase = ucCh).
+ ] ifFalse:[
+ self assert:(ch asUppercase = ch).
+ ].
+ lcValue notNil ifTrue:[
+ lcCh := Character value:lcValue.
+ self assert:(ch asLowercase = lcCh).
+ ] ifFalse:[
+ self assert:(ch asLowercase = ch).
+ ].
+ tcValue notNil ifTrue:[
+ tcCh := Character value:tcValue.
+ self assert:(ch asTitlecase = tcCh).
+ ] ifFalse:[
+ self assert:(ch asTitlecase = ch).
+ ].
+ ].
+
+ "
+ self new test01CaseTesting
+ "
+! !
+
+!CharacterTests class methodsFor:'documentation'!
+
+version
+ ^ '$Header$'
+! !