aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2019-03-25 16:32:50 +0100
committerMax <msuraev@sysmocom.de>2019-03-26 11:19:30 +0100
commit8a8e0fb2675878c045d9770da0940c7c895b89ec (patch)
treef24bf858ddbc36b3f51ca0270a56b5a4e606e5f0 /tests
parentfb3fd093536af6c4f40709b8170bf32cf435fc94 (diff)
MCS: add mcs_is_*() helpers
In preparation for Channel Coding Command encoder in follow-up patches let's add necessary helpers. Those are similar to previously used helpers from GprsCodingScheme class but without CamelCase and with less typo chances between Gprs and Egprs cases. Change-Id: I6699cbc8d7ae766fa4d2b3d37e5f9ff1cf158b7e
Diffstat (limited to 'tests')
-rw-r--r--tests/edge/EdgeTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp
index b902806..f124b76 100644
--- a/tests/edge/EdgeTest.cpp
+++ b/tests/edge/EdgeTest.cpp
@@ -59,14 +59,14 @@ static void check_coding_scheme(GprsCodingScheme& cs, enum mcs_kind mode)
/* Check static getBySizeUL() */
expected_size = cs.usedSizeUL();
- if (cs.spareBitsUL() > 0 && cs.isGprs())
+ if (cs.spareBitsUL() > 0 && mcs_is_gprs(cs))
expected_size += 1;
OSMO_ASSERT(expected_size == cs.sizeUL());
OSMO_ASSERT(cs == GprsCodingScheme::getBySizeUL(expected_size));
/* Check static sizeUL() */
expected_size = cs.usedSizeDL();
- if (cs.spareBitsDL() > 0 && cs.isGprs())
+ if (cs.spareBitsDL() > 0 && mcs_is_gprs(cs))
expected_size += 1;
OSMO_ASSERT(expected_size == cs.sizeDL());
@@ -157,9 +157,9 @@ static void test_coding_scheme()
for (i = 0; i < ARRAY_SIZE(gprs_schemes); i++) {
GprsCodingScheme current_cs(gprs_schemes[i]);
- OSMO_ASSERT(current_cs.isGprs());
- OSMO_ASSERT(!current_cs.isEgprs());
- OSMO_ASSERT(!current_cs.isEgprsGmsk());
+ OSMO_ASSERT(mcs_is_gprs(current_cs));
+ OSMO_ASSERT(!mcs_is_edge(current_cs));
+ OSMO_ASSERT(!mcs_is_edge_gmsk(current_cs));
OSMO_ASSERT(CodingScheme(current_cs) == gprs_schemes[i]);
OSMO_ASSERT(current_cs == GprsCodingScheme(gprs_schemes[i]));
@@ -179,9 +179,9 @@ static void test_coding_scheme()
for (i = 0; i < ARRAY_SIZE(egprs_schemes); i++) {
GprsCodingScheme current_cs(egprs_schemes[i].s);
- OSMO_ASSERT(!current_cs.isGprs());
- OSMO_ASSERT(current_cs.isEgprs());
- OSMO_ASSERT(!!current_cs.isEgprsGmsk() == !!egprs_schemes[i].is_gmsk);
+ OSMO_ASSERT(!mcs_is_gprs(current_cs));
+ OSMO_ASSERT(mcs_is_edge(current_cs));
+ OSMO_ASSERT(mcs_is_edge_gmsk(current_cs) == !!egprs_schemes[i].is_gmsk);
OSMO_ASSERT(CodingScheme(current_cs) == egprs_schemes[i].s);
OSMO_ASSERT(current_cs == GprsCodingScheme(egprs_schemes[i].s));