summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-01-10 23:42:19 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2018-01-13 03:21:08 +0600
commitc0771d62c19a09608a570a433da5c0c9de6f4884 (patch)
treec293232b796516a9fc33d84cc3fc485693b8a2e9 /tests
parentbb62cbc099fc5219a857a9738410d87d994fea89 (diff)
ussd_test.c: fix rc / len debug output confusion
Both len and rc values were swapped in the test output. Change-Id: Iebd82531c6ced5d16b15dad4ff4ce654c82db309
Diffstat (limited to 'tests')
-rw-r--r--tests/ussd/ussd_test.c4
-rw-r--r--tests/ussd/ussd_test.ok100
2 files changed, 52 insertions, 52 deletions
diff --git a/tests/ussd/ussd_test.c b/tests/ussd/ussd_test.c
index 40b4317a..bf6d731c 100644
--- a/tests/ussd/ussd_test.c
+++ b/tests/ussd/ussd_test.c
@@ -140,13 +140,13 @@ int main(int argc, char **argv)
for (i = size; i > sizeof(struct gsm48_hdr); --i) {
int rc = parse_ussd(&ussd_request[0], i);
- printf("Result for %d is %d\n", rc, i);
+ printf("Result for len=%d is %d\n", i, rc);
}
printf("Mangling the container now\n");
for (i = size; i > sizeof(struct gsm48_hdr) + 2; --i) {
int rc = parse_mangle_ussd(&ussd_request[0], i);
- printf("Result for %d is %d\n", rc, i);
+ printf("Result for len=%d is %d\n", i, rc);
}
printf("<CR> case test for 7 bit encode\n");
diff --git a/tests/ussd/ussd_test.ok b/tests/ussd/ussd_test.ok
index 69ea53c3..aff383eb 100644
--- a/tests/ussd/ussd_test.ok
+++ b/tests/ussd/ussd_test.ok
@@ -1,57 +1,57 @@
Tested if it still works. Text was: **321#
interrogateSS CFU text..'' code 33
Testing parsing a USSD request and truncated versions
-Result for 1 is 28
-Result for 1 is 27
-Result for 1 is 26
-Result for 1 is 25
-Result for 0 is 24
-Result for 0 is 23
-Result for 0 is 22
-Result for 0 is 21
-Result for 0 is 20
-Result for 0 is 19
-Result for 0 is 18
-Result for 0 is 17
-Result for 0 is 16
-Result for 0 is 15
-Result for 0 is 14
-Result for 0 is 13
-Result for 0 is 12
-Result for 0 is 11
-Result for 0 is 10
-Result for 0 is 9
-Result for 0 is 8
-Result for 0 is 7
-Result for 0 is 6
-Result for 0 is 5
-Result for 0 is 4
-Result for 0 is 3
+Result for len=28 is 1
+Result for len=27 is 1
+Result for len=26 is 1
+Result for len=25 is 1
+Result for len=24 is 0
+Result for len=23 is 0
+Result for len=22 is 0
+Result for len=21 is 0
+Result for len=20 is 0
+Result for len=19 is 0
+Result for len=18 is 0
+Result for len=17 is 0
+Result for len=16 is 0
+Result for len=15 is 0
+Result for len=14 is 0
+Result for len=13 is 0
+Result for len=12 is 0
+Result for len=11 is 0
+Result for len=10 is 0
+Result for len=9 is 0
+Result for len=8 is 0
+Result for len=7 is 0
+Result for len=6 is 0
+Result for len=5 is 0
+Result for len=4 is 0
+Result for len=3 is 0
Mangling the container now
-Result for 0 is 28
-Result for 0 is 27
-Result for 1 is 26
-Result for 1 is 25
-Result for 0 is 24
-Result for 0 is 23
-Result for 0 is 22
-Result for 0 is 21
-Result for 0 is 20
-Result for 0 is 19
-Result for 0 is 18
-Result for 0 is 17
-Result for 0 is 16
-Result for 0 is 15
-Result for 0 is 14
-Result for 0 is 13
-Result for 0 is 12
-Result for 0 is 11
-Result for 0 is 10
-Result for 0 is 9
-Result for 0 is 8
-Result for 0 is 7
-Result for 0 is 6
-Result for 1 is 5
+Result for len=28 is 0
+Result for len=27 is 0
+Result for len=26 is 1
+Result for len=25 is 1
+Result for len=24 is 0
+Result for len=23 is 0
+Result for len=22 is 0
+Result for len=21 is 0
+Result for len=20 is 0
+Result for len=19 is 0
+Result for len=18 is 0
+Result for len=17 is 0
+Result for len=16 is 0
+Result for len=15 is 0
+Result for len=14 is 0
+Result for len=13 is 0
+Result for len=12 is 0
+Result for len=11 is 0
+Result for len=10 is 0
+Result for len=9 is 0
+Result for len=8 is 0
+Result for len=7 is 0
+Result for len=6 is 0
+Result for len=5 is 1
<CR> case test for 7 bit encode
original = 30 31 32 33 34 35 36 37
encoded = b0 98 6c 46 ab d9 6e