aboutsummaryrefslogtreecommitdiffstats
path: root/SMSTests.st
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-09 15:35:48 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-09 15:36:32 +0100
commit1dd46f82bbce76ccb6dc27bd7c6a5ced64d20543 (patch)
tree939cb9c6c38cf3b749c87bafba600c1a8762a546 /SMSTests.st
parentce4840a077fbce33e5cfe1bf820cf80e7c40ec94 (diff)
sms: Work on decoding RP-DATA/RP-ACK/RP-ERROR/RP-SMMA messages
Done on the flight to iceland, comitted in the bus to the hotel. It is a bit rushed as the battery runs low. Updated the test result as the RP-UserData was short in the other data
Diffstat (limited to 'SMSTests.st')
-rw-r--r--SMSTests.st17
1 files changed, 10 insertions, 7 deletions
diff --git a/SMSTests.st b/SMSTests.st
index c09c00d..47e33c8 100644
--- a/SMSTests.st
+++ b/SMSTests.st
@@ -21,18 +21,21 @@ TestCase subclass: GSM411Test [
testCPData [
| inp dec |
- inp := #(16r09 16r01 16r35 16r01 16r2A 16r07 16r91 16r44
- 16r77 16r58 16r10 16r06 16r50 16r00 16r2B 16r04
- 16r04 16r81 16r32 16r24 16r00 16r00 16r80 16r21
- 16r03 16r41 16r24 16r32 16r40 16r1F 16r41 16r26
- 16r03 16r94 16r7D 16r56 16rA5 16r20 16r28 16rF2
- 16rE9 16r2C 16r82 16r82 16rD2 16r22 16r48 16r58
- 16r64 16r3E 16r9D 16r47 16r10 16rF5 16r09 16rAA) asByteArray.
+ inp := #[
+ 16r09 16r01 16r23 16r00 16r0C 16r00 16r07 16r91
+ 16r36 16r19 16r08 16r00 16r10 16r50 16r17 16r01
+ 16r0C 16r0F 16r81 16r00 16r33 16r33 16r33 16r33
+ 16r33 16r33 16rF3 16r00 16r00 16r09 16rAA 16rBB
+ 16rCC 16rDD 16rEE 16rFF 16r11 16r22].
+
dec := GSM48MSG decode: inp readStream.
self
assert: dec type = GSMCpData messageType;
assert: dec toMessage asByteArray = inp.
+
+ self
+ assert: dec rpMessage toMessage asByteArray = dec userData data.
]
testCPData2 [