aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-23 16:18:18 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-23 16:19:17 +0100
commit9525567d7725b4808421dc7dda26e550111214f3 (patch)
treec89258afa51c5103793f140feff19b89a7294339 /tests
parent6b5660c19febc84c3851c8499daf6fcca990e427 (diff)
rlc: Create a basic test that mark/is is talking about the same
Diffstat (limited to 'tests')
-rw-r--r--tests/types/TypesTest.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 727f148..517f8ea 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -89,11 +89,38 @@ static void test_rlc()
}
}
+static void test_rlc_v_b()
+{
+ {
+ gprs_rlc_v_b vb;
+ vb.reset();
+
+ for (size_t i = 0; i < RLC_MAX_SNS/2; ++i)
+ OSMO_ASSERT(vb.is_invalid(i));
+
+ vb.mark_unacked(23);
+ OSMO_ASSERT(vb.is_unacked(23));
+
+ vb.mark_nacked(23);
+ OSMO_ASSERT(vb.is_nacked(23));
+
+ vb.mark_acked(23);
+ OSMO_ASSERT(vb.is_acked(23));
+
+ vb.mark_resend(23);
+ OSMO_ASSERT(vb.is_resend(23));
+
+ vb.mark_invalid(23);
+ OSMO_ASSERT(vb.is_invalid(23));
+ }
+}
+
int main(int argc, char **argv)
{
printf("Making some basic type testing.\n");
test_llc();
test_rlc();
+ test_rlc_v_b();
return EXIT_SUCCESS;
}