aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-24 22:00:43 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-26 21:00:51 +0100
commite9b1ebba9d720374700d3cb2537fcd2725c50a84 (patch)
treec9cd8640798f39723cc60d62b8953f576904499e /tests
parent270f7fce1d5558f66277cbb4c08e3e7cfc4d9c4c (diff)
rlc: Test the basic of the gprs_rlc_v_n code for remembering the state
Diffstat (limited to 'tests')
-rw-r--r--tests/types/TypesTest.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 517f8ea3..8f6aec23 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -115,12 +115,32 @@ static void test_rlc_v_b()
}
}
+static void test_rlc_v_n()
+{
+ {
+ gprs_rlc_v_n vn;
+ vn.reset();
+
+ OSMO_ASSERT(!vn.is_received(0x23));
+ OSMO_ASSERT(vn.state(0x23) == ' ');
+
+ vn.mark_received(0x23);
+ OSMO_ASSERT(vn.is_received(0x23));
+ OSMO_ASSERT(vn.state(0x23) == 'R');
+
+ vn.mark_missing(0x23);
+ OSMO_ASSERT(!vn.is_received(0x23));
+ OSMO_ASSERT(vn.state(0x23) == 'N');
+ }
+}
+
int main(int argc, char **argv)
{
printf("Making some basic type testing.\n");
test_llc();
test_rlc();
test_rlc_v_b();
+ test_rlc_v_n();
return EXIT_SUCCESS;
}