diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-03 15:25:04 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-03 16:59:38 +0100 |
commit | fba39469aa4611b37394ddf9857402cd528e41fc (patch) | |
tree | 3e52abbfc0cb5162b8d5bb859ef5815825693f41 /tests | |
parent | 03defcf3dc8ae0d6ada8b3fd3edd025cbe9ef1d6 (diff) |
cs: Add family related methods
Add family handling and the related methods family,
isFamilyCompatible, isCombinable, decToSingleBlock to
GprsCodingScheme.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests')
-rw-r--r-- | tests/edge/EdgeTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp index 5b647012..341567e3 100644 --- a/tests/edge/EdgeTest.cpp +++ b/tests/edge/EdgeTest.cpp @@ -46,6 +46,7 @@ int16_t spoof_mnc = 0, spoof_mcc = 0; static void check_coding_scheme(GprsCodingScheme& cs, GprsCodingScheme::Mode mode) { volatile unsigned expected_size; + bool need_padding; GprsCodingScheme new_cs; OSMO_ASSERT(cs.isValid()); @@ -84,6 +85,18 @@ static void check_coding_scheme(GprsCodingScheme& cs, GprsCodingScheme::Mode mod OSMO_ASSERT(new_cs.isCompatible(mode)); OSMO_ASSERT(new_cs == cs); } + + new_cs = cs; + new_cs.decToSingleBlock(&need_padding); + OSMO_ASSERT(new_cs.isFamilyCompatible(cs)); + OSMO_ASSERT(cs.isFamilyCompatible(new_cs)); + OSMO_ASSERT(cs.isCompatible(new_cs)); + if (need_padding) { + OSMO_ASSERT(new_cs.maxDataBlockBytes() > cs.maxDataBlockBytes()); + } else { + OSMO_ASSERT(new_cs.maxDataBlockBytes() == cs.maxDataBlockBytes()); + } + } static void test_coding_scheme() |