RegressionTests__PhonemStringComparatorTest.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 18:53:03 +0200
changeset 2327 bf482d49aeaf
parent 2171 7e1468f91656
permissions -rw-r--r--
#QUALITY by exept class: RegressionTests::StringTests added: #test82c_expanding

"{ Package: 'stx:goodies/regression' }"

"{ NameSpace: RegressionTests }"

TestCase subclass:#PhonemStringComparatorTest
	instanceVariableNames:'sc'
	classVariableNames:''
	poolDictionaries:''
	category:'tests-Regression-Collections-Utilities'
!


!PhonemStringComparatorTest methodsFor:'initialize / release'!

setUp
    sc := PhoneticStringUtilities::PhonemStringComparator new

    "Modified: / 28-07-2017 / 16:03:19 / cg"
! !

!PhonemStringComparatorTest methodsFor:'tests'!

test02_WellKnownResults
    "tests some wellknown phonem codes"

    |code|

    ^ self.
    self skip:'Unshure, which implementation is correct'.
    
    "/ the following test vector is for another phonem implementation;
    "/ now, I don't know which one is correct...
    
    #(
        ('schneider'    'CNAYDR')
        ('fischer'      'VYCR')
        ('meyer'        'MAYR')
        ('mair'         'MAYR')
        ('schulz'       'CULC')
        ('becker'       'BCR')
        ('hoffmann'     'OVMAN')
        ('schaeffer'    'CVR')
        ('pfeifer'      'VAYVR')
        ('pfeiffer'     'VAYVR')
        
        ('Müller'       'MULR' )
        ('weber'        'BR')
        ('wagner'       'BACNR')
        ('bäker'        'BACR')
        ('schäfer'      'CAVR')
        ('computer'     'COMDUR')
    ) pairsDo:[:word :expectedCode |
        code := (sc phoneticStringsFor:word) first.
        self assert:(code = expectedCode).
    ].

    "Created: / 27-07-2017 / 15:14:59 / cg"
    "Modified: / 31-07-2017 / 17:54:31 / cg"
    "Modified (comment): / 03-08-2017 / 14:57:31 / cg"
! !

!PhonemStringComparatorTest class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !