1659
|
1 |
"{ Package: 'stx:goodies/regression' }"
|
|
2 |
|
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
|
5 |
TestCase subclass:#PhonemStringComparatorTest
|
|
6 |
instanceVariableNames:'sc'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'tests-Regression-Collections-Utilities'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
2171
|
13 |
!PhonemStringComparatorTest methodsFor:'initialize / release'!
|
1659
|
14 |
|
|
15 |
setUp
|
|
16 |
sc := PhoneticStringUtilities::PhonemStringComparator new
|
|
17 |
|
|
18 |
"Modified: / 28-07-2017 / 16:03:19 / cg"
|
|
19 |
! !
|
|
20 |
|
|
21 |
!PhonemStringComparatorTest methodsFor:'tests'!
|
|
22 |
|
|
23 |
test02_WellKnownResults
|
1674
|
24 |
"tests some wellknown phonem codes"
|
1659
|
25 |
|
|
26 |
|code|
|
|
27 |
|
1666
|
28 |
^ self.
|
1659
|
29 |
self skip:'Unshure, which implementation is correct'.
|
|
30 |
|
|
31 |
"/ the following test vector is for another phonem implementation;
|
|
32 |
"/ now, I don't know which one is correct...
|
|
33 |
|
|
34 |
#(
|
|
35 |
('schneider' 'CNAYDR')
|
|
36 |
('fischer' 'VYCR')
|
|
37 |
('meyer' 'MAYR')
|
|
38 |
('mair' 'MAYR')
|
|
39 |
('schulz' 'CULC')
|
|
40 |
('becker' 'BCR')
|
|
41 |
('hoffmann' 'OVMAN')
|
|
42 |
('schaeffer' 'CVR')
|
|
43 |
('pfeifer' 'VAYVR')
|
|
44 |
('pfeiffer' 'VAYVR')
|
|
45 |
|
1666
|
46 |
('Müller' 'MULR' )
|
1659
|
47 |
('weber' 'BR')
|
|
48 |
('wagner' 'BACNR')
|
1666
|
49 |
('bäker' 'BACR')
|
|
50 |
('schäfer' 'CAVR')
|
1659
|
51 |
('computer' 'COMDUR')
|
|
52 |
) pairsDo:[:word :expectedCode |
|
|
53 |
code := (sc phoneticStringsFor:word) first.
|
|
54 |
self assert:(code = expectedCode).
|
|
55 |
].
|
|
56 |
|
|
57 |
"Created: / 27-07-2017 / 15:14:59 / cg"
|
1666
|
58 |
"Modified: / 31-07-2017 / 17:54:31 / cg"
|
1674
|
59 |
"Modified (comment): / 03-08-2017 / 14:57:31 / cg"
|
1659
|
60 |
! !
|
|
61 |
|
|
62 |
!PhonemStringComparatorTest class methodsFor:'documentation'!
|
|
63 |
|
|
64 |
version
|
|
65 |
^ '$Header$'
|
|
66 |
!
|
|
67 |
|
|
68 |
version_CVS
|
|
69 |
^ '$Header$'
|
|
70 |
! !
|
|
71 |
|