tests/TypesTest: Check rbb handling in DL
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 407f91e..ea9fdbe 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -333,6 +333,42 @@
 		count = ul_win.raise_v_q(&v_n);
 		OSMO_ASSERT(count == 0);
 	}
+
+	{
+		int count;
+		uint8_t rbb[8];
+		uint16_t lost = 0, recv = 0;
+		char show_rbb[65];
+		BTS dummy_bts;
+		gprs_rlc_dl_window dl_win = { 0, };
+		gprs_rlc_v_b v_b;
+
+		v_b.reset();
+
+		OSMO_ASSERT(dl_win.window_empty());
+		OSMO_ASSERT(!dl_win.window_stalled());
+		OSMO_ASSERT(dl_win.distance() == 0);
+
+		dl_win.increment_send();
+		OSMO_ASSERT(!dl_win.window_empty());
+		OSMO_ASSERT(!dl_win.window_stalled());
+		OSMO_ASSERT(dl_win.distance() == 1);
+
+		for (int i = 0; i < 35; ++i) {
+			dl_win.increment_send();
+			OSMO_ASSERT(!dl_win.window_empty());
+			OSMO_ASSERT(dl_win.distance() == i + 2);
+		}
+
+		uint8_t rbb_cmp[8] = { 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff };
+		Decoding::extract_rbb(rbb_cmp, show_rbb);
+		printf("show_rbb: %s\n", show_rbb);
+
+		v_b.update(&dummy_bts, show_rbb, 35, dl_win, &lost, &recv);
+		OSMO_ASSERT(lost == 0);
+		OSMO_ASSERT(recv == 35);
+
+	}
 }
 
 int main(int argc, char **argv)
diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok
index 4f5f15f..6ca2717 100644
--- a/tests/types/TypesTest.ok
+++ b/tests/types/TypesTest.ok
@@ -4,3 +4,4 @@
 rbb: 00 00 00 00 00 00 00 03 
 rbb: 00 00 00 00 00 00 00 31 
 rbb: 10 00 00 00 00 00 00 01 
+show_rbb: IIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR