diff options
author | Aravind Sirsikar <Arvind.Sirsikar@radisys.com> | 2016-08-30 13:00:14 +0530 |
---|---|---|
committer | arvind.sirsikar <arvind.sirsikar@radisys.com> | 2016-09-02 06:45:32 +0000 |
commit | a35c911a91ea7b6d8b017fd103c0d86f79bb271e (patch) | |
tree | 3eb35c0db4418025a39c5d180690694d88f97e95 | |
parent | 3c2eaebd214fd39ebaf0bf86d2120bd226c62309 (diff) |
GPRS: PUAN encoding: add test case to show wrong BSNs status
This patch adds a test case which expects a current bug with
GPRS PUAN encoding. The test's expectation
is corrected along with the bug fix in a subsequent commit
Related: OS#1806
Change-Id: Ied0f1dd3037d8fac6a772f4e097defb72634f955
-rw-r--r-- | tests/types/TypesTest.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index c56b125..c5654f6 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -322,6 +322,24 @@ static void test_rlc_dl_ul_basic() ul_win.receive_bsn(4); count = ul_win.raise_v_q(); OSMO_ASSERT(count == 0); + + /* + * SSN wrap around case + * TODO: Should not expect any BSN as nacked. + * should be fixed in subsequent patch + */ + rbb = "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRR"; + for (int i = 0; i < 128; ++i) { + ul_win.receive_bsn(i); + ul_win.raise_v_q(); + } + ul_win.receive_bsn(0); + ul_win.raise_v_q(); + ul_win.receive_bsn(1); + ul_win.raise_v_q(); + ul_win.update_rbb(win_rbb); + OSMO_ASSERT_STR_EQ(win_rbb, rbb); + OSMO_ASSERT(ul_win.ssn() == 2); } { |