pespin has uploaded this change for review.

View Change

tests/amr: Add test case for unused FT=14

FT=15 will be accepted in follow-up patch, so keep a tests checking the
invalid FT code path.

Change-Id: I5872921f5d4a909261e770ddecf048329200724b
---
M tests/amr/amr_test.c
M tests/amr/amr_test.ok
2 files changed, 11 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/96/30696/1
diff --git a/tests/amr/amr_test.c b/tests/amr/amr_test.c
index d332eaa..593723c 100644
--- a/tests/amr/amr_test.c
+++ b/tests/amr/amr_test.c
@@ -48,7 +48,8 @@
"0004f89d67f1160935bde1996840",
"0004633cc7f0630439ffe0000000",
"0004eb81fc0758973b9edc782550",
- "a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT, will be detected as bandwith-efficient */
+ "a070ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT=14, will be detected as bandwith-efficient */
+ "a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT=15, will be detected as bandwith-efficient */
"END",
};

diff --git a/tests/amr/amr_test.ok b/tests/amr/amr_test.ok
index 02e36d9..8aee2d3 100644
--- a/tests/amr/amr_test.ok
+++ b/tests/amr/amr_test.ok
@@ -157,6 +157,13 @@
rc: 14

Sample No.: 22
+ octet aligned: a070ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc
+ 101000000111000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100
+ bw-efficient:
+ (no data)
+ rc: -1
+
+Sample No.: 23
octet aligned: a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc
101000000111100011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100
bw-efficient:
@@ -310,6 +317,7 @@
Sample No.: 20... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes
Sample No.: 21... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes
Sample No.: 22... skipping a sample with a wrong FT
+Sample No.: 23... skipping a sample with a wrong FT


Testing conversion from IuUP to bw-efficient and inverse:
@@ -342,6 +350,7 @@
Sample No.: 20 ==>octet aligned
Sample No.: 21 ==>octet aligned
Sample No.: 22 ==>bandwith efficient
+Sample No.: 23 ==>bandwith efficient
Sample No.: 0 ==>bandwith efficient
Sample No.: 1 ==>bandwith efficient
Sample No.: 2 ==>bandwith efficient

To view, visit change 30696. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I5872921f5d4a909261e770ddecf048329200724b
Gerrit-Change-Number: 30696
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange