summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-09-29 03:54:55 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-09-29 03:58:12 +0700
commit23b205432f2952c04e04b4d720adfa67dec5db64 (patch)
tree8a56646650525672ac784b1cd51da09ea6361732
parent9169849c140a0ec9058942b4699f60f300da5ec1 (diff)
[TEST] library: add TC_si10ro_codec (decoder test)fixeria/si10ro
This testcase can be executed from any testsuite that imports the GSM_RestOctets module, for example: ../start-testsuite.sh ./BTS_Tests ./BTS_Tests.cfg \ GSM_RestOctets.TC_si10ro_codec You can supply the input samples using module param 'mp_si10ro_data'. Change-Id: I5313db4ab7e1ab8dce3f07e82838138f4c7f8d4f
-rw-r--r--bts/BTS_Tests.cfg2
-rw-r--r--library/GSM_RestOctets.ttcn12
2 files changed, 14 insertions, 0 deletions
diff --git a/bts/BTS_Tests.cfg b/bts/BTS_Tests.cfg
index fb78ebae..148e3cd9 100644
--- a/bts/BTS_Tests.cfg
+++ b/bts/BTS_Tests.cfg
@@ -34,6 +34,8 @@ BTS_Tests.mp_l1_supports_gprs := true
BTS_Tests_OML.mp_pcu_socket := "/tmp/pcu_sock"
+GSM_RestOctets.mp_si10ro_data := '2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b'O;
+
[MAIN_CONTROLLER]
[EXECUTE]
diff --git a/library/GSM_RestOctets.ttcn b/library/GSM_RestOctets.ttcn
index eff95469..99b91a12 100644
--- a/library/GSM_RestOctets.ttcn
+++ b/library/GSM_RestOctets.ttcn
@@ -1441,4 +1441,16 @@ template (value) SI4RestOctets ts_SI4RestOctets := {
}
+modulepar {
+ octetstring mp_si10ro_data := '2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b'O; // 160 bits
+};
+
+private type component dummy_CT { };
+
+testcase TC_si10ro_codec() runs on dummy_CT {
+ var SI10RestOctets si10ro := dec_SI10RestOctets(mp_si10ro_data);
+ log(si10ro);
+}
+
+
} with { encode "RAW"; variant "FIELDORDER(msb)" }