"{ Package: 'exept:regression' }"
"{ NameSpace: RegressionTests }"
TestCase subclass:#CharacterTests
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'tests-Regression'
!
!CharacterTests methodsFor:'tests'!
test01CaseTesting
CharacterEncoderCodeGenerator new
readingUnicodeDataFrom:
"/ '/phys/exept/home/documentation/standards/unicode/UnicodeData-3.1.0.txt'
'/phys/exept/home/documentation/standards/unicode/UnicodeData-4.0.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$'
!
version_CVS
^ '$Header$'
! !