aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2019-02-18 20:42:42 +0100
committerMax <msuraev@sysmocom.de>2019-02-19 18:58:04 +0100
commit7426c5f95727647523720992ae4610d61efd2abd (patch)
tree2c19cdf728f3e2cb939f0dfcaf7cfc389ec716cc /tests
parent0c55bf19a55ae2ec2bcf0fa005c7aa6da8ea02a6 (diff)
Add define for dummy burst string
Diffstat (limited to 'tests')
-rw-r--r--tests/rlcmac/RLCMACTest.cpp10
-rw-r--r--tests/types/TypesTest.cpp7
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp
index 3de4facc..bf7a6052 100644
--- a/tests/rlcmac/RLCMACTest.cpp
+++ b/tests/rlcmac/RLCMACTest.cpp
@@ -25,6 +25,8 @@
#include <cstring>
#include "csn1.h"
#include "gsm_rlcmac.h"
+#include "gprs_rlcmac.h"
+
extern "C" {
extern const struct log_info gprs_log_info;
#include "pcu_vty.h"
@@ -86,7 +88,7 @@ void printSizeofRLCMAC()
void testRlcMacDownlink(void *test_ctx)
{
struct bitvec *resultVector = bitvec_alloc(23, test_ctx);
- bitvec_unhex(resultVector, "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ bitvec_unhex(resultVector, DUMMY_VEC);
std::string testData[] = {
"4e082500e3f1a81d080820800b2b2b2b2b2b2b2b2b2b2b", // Packet Downlink Assignment
@@ -141,7 +143,7 @@ void testRlcMacDownlink(void *test_ctx)
{
cout << "vector1 == vector2 : FALSE" << endl;
}
- bitvec_unhex(resultVector, "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ bitvec_unhex(resultVector, DUMMY_VEC);
bitvec_free(vector);
free(data);
}
@@ -153,7 +155,7 @@ void testRlcMacDownlink(void *test_ctx)
void testRlcMacUplink(void *test_ctx)
{
struct bitvec *resultVector = bitvec_alloc(23, test_ctx);
- bitvec_unhex(resultVector, "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ bitvec_unhex(resultVector, DUMMY_VEC);
std::string testData[] = {
"400e1e61d11d2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b", // Packet Uplink Dummy Control Block
@@ -204,7 +206,7 @@ void testRlcMacUplink(void *test_ctx)
{
cout << "vector1 == vector2 : FALSE" << endl;
}
- bitvec_unhex(resultVector, "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ bitvec_unhex(resultVector, DUMMY_VEC);
bitvec_free(vector);
free(data);
}
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 1bc911f5..90d39812 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -25,6 +25,7 @@
#include "gprs_debug.h"
#include "encoding.h"
#include "decoding.h"
+#include "gprs_rlcmac.h"
extern "C" {
#include <osmocom/core/application.h>
@@ -435,8 +436,7 @@ void test_immediate_assign_rej()
uint8_t plen;
bitvec *immediate_assignment_rej = bitvec_alloc(22, tall_pcu_ctx);
- bitvec_unhex(immediate_assignment_rej,
- "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ bitvec_unhex(immediate_assignment_rej, DUMMY_VEC);
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment_rej, 112, 100,
GSM_L1_BURST_TYPE_ACCESS_1);
@@ -450,8 +450,7 @@ void test_immediate_assign_rej()
/* Extended RA value */
OSMO_ASSERT(immediate_assignment_rej->data[19] == 0xc0);
- bitvec_unhex(immediate_assignment_rej,
- "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ bitvec_unhex(immediate_assignment_rej, DUMMY_VEC);
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment_rej, 112, 100,