smalltalk
/
osmo-st-gsm
Archived
1
0
Fork 0

tests: Add a testcase of some encoding issue i suspected

I added a testcase because I suspected a decoding issue but
it turns out that this was not the case..
This commit is contained in:
Holger Hans Peter Freyther 2013-10-08 16:09:49 +02:00
parent 7b76b7bf06
commit ce4840a077
1 changed files with 7 additions and 0 deletions

View File

@ -950,12 +950,19 @@ TestCase subclass: GSMNumberDigitsTest [
number := #(73 132 50 23 120 186 220 174).
res := GSMNumberDigits decodeFrom: number.
self assert: res = '9448237187*#abc*'.
number := #(114 4 8 0 0 48 0 240).
res := GSMNumberDigits decodeFrom: number.
self assert: res = '274080000003000'.
]
testEncodeFrom [
| res |
res := GSMNumberDigits encodeFrom: '9448237187*#abc*'.
self assert: res = #(73 132 50 23 120 186 220 174) asByteArray.
res := GSMNumberDigits encodeFrom: '274080000003000'.
self assert: res = #(114 4 8 0 0 48 0 240) asByteArray.
]
]