tests: Move the GSNNumberDigit Test to a dedicated test class
This makes jump to test work on Pharo
This commit is contained in:
parent
ac5b3c08fc
commit
5b48038ca8
39
Tests.st
39
Tests.st
|
@ -282,23 +282,6 @@ TestCase subclass: GSM48Test [
|
||||||
self assert: msg asByteArray = res
|
self assert: msg asByteArray = res
|
||||||
]
|
]
|
||||||
|
|
||||||
testNumberDecode [
|
|
||||||
| number res |
|
|
||||||
number := #(73 132 50 23 120).
|
|
||||||
res := GSMNumberDigits decodeFrom: number.
|
|
||||||
self assert: res = '9448237187'.
|
|
||||||
|
|
||||||
number := #(73 132 50 23 120 186 220 174).
|
|
||||||
res := GSMNumberDigits decodeFrom: number.
|
|
||||||
self assert: res = '9448237187*#abc*'.
|
|
||||||
]
|
|
||||||
|
|
||||||
testNumberEncode [
|
|
||||||
| res |
|
|
||||||
res := GSMNumberDigits encodeFrom: '9448237187*#abc*'.
|
|
||||||
self assert: res = #(73 132 50 23 120 186 220 174) asByteArray.
|
|
||||||
]
|
|
||||||
|
|
||||||
testAuRejParsing [
|
testAuRejParsing [
|
||||||
| inp dec |
|
| inp dec |
|
||||||
|
|
||||||
|
@ -924,3 +907,25 @@ TestCase subclass: TestGSM48ProgressIE [
|
||||||
self assert: prog progress = GSMProgress progressOrigNotInISDN.
|
self assert: prog progress = GSMProgress progressOrigNotInISDN.
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
TestCase subclass: GSMNumberDigitsTest [
|
||||||
|
<category: 'OsmoGSM-Test'>
|
||||||
|
|
||||||
|
testDecodeFrom [
|
||||||
|
| number res |
|
||||||
|
number := #(73 132 50 23 120).
|
||||||
|
res := GSMNumberDigits decodeFrom: number.
|
||||||
|
self assert: res = '9448237187'.
|
||||||
|
|
||||||
|
number := #(73 132 50 23 120 186 220 174).
|
||||||
|
res := GSMNumberDigits decodeFrom: number.
|
||||||
|
self assert: res = '9448237187*#abc*'.
|
||||||
|
]
|
||||||
|
|
||||||
|
testEncodeFrom [
|
||||||
|
| res |
|
||||||
|
res := GSMNumberDigits encodeFrom: '9448237187*#abc*'.
|
||||||
|
self assert: res = #(73 132 50 23 120 186 220 174) asByteArray.
|
||||||
|
]
|
||||||
|
|
||||||
|
]
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<sunit>OsmoGSM.BitfieldTest</sunit>
|
<sunit>OsmoGSM.BitfieldTest</sunit>
|
||||||
<sunit>OsmoGSM.TestGSM48ProgressIE</sunit>
|
<sunit>OsmoGSM.TestGSM48ProgressIE</sunit>
|
||||||
<sunit>OsmoGSM.GSM411Test</sunit>
|
<sunit>OsmoGSM.GSM411Test</sunit>
|
||||||
|
<sunit>OsmoGSM.GSMNumberDigitsTest</sunit>
|
||||||
<filein>Tests.st</filein>
|
<filein>Tests.st</filein>
|
||||||
<filein>SMSTests.st</filein>
|
<filein>SMSTests.st</filein>
|
||||||
</test>
|
</test>
|
||||||
|
|
Reference in New Issue