tests: Make the test data static const
This commit is contained in:
parent
49844e8deb
commit
a479c1b6f5
|
@ -7,37 +7,37 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
uint8_t pkt125[] = {
|
||||
static const uint8_t pkt125[] = {
|
||||
0x06, 0x01, 0x04,
|
||||
0x00, 0x00, 0x01, 0x0b, 0x00, 0x09, 0x01, 0x0b,
|
||||
0x03, 0x01, 0x0b, 0x25, 0x01, 0x00, 0x02 };
|
||||
|
||||
uint8_t pkt125_res[] = {
|
||||
static const uint8_t pkt125_res[] = {
|
||||
0x06, 0x01, 0x04,
|
||||
0x00, 0x00, 0x01, 0x0b, 0x00, 0x09, 0x01, 0x0b,
|
||||
0x03, 0x01, 0x0a, 0x11, 0x01, 0x00, 0x02 };
|
||||
|
||||
uint8_t pkt28[] = {
|
||||
static const uint8_t pkt28[] = {
|
||||
0x06, 0x01, 0x05,
|
||||
0x2b, 0x00, 0x01, 0x09, 0x00, 0x07, 0x02, 0x21,
|
||||
0x08, 0x2c, 0x02, 0x40, 0x11 };
|
||||
uint8_t pkt28_res[] = {
|
||||
static const uint8_t pkt28_res[] = {
|
||||
0x06, 0x01, 0x05,
|
||||
0x2b, 0x00, 0x01, 0x09, 0x00, 0x07, 0x02, 0x21,
|
||||
0x09, 0x2c, 0x02, 0x40, 0x25 };
|
||||
|
||||
uint8_t reset_ack[] = {
|
||||
static const uint8_t reset_ack[] = {
|
||||
0x09, 0x00, 0x03,
|
||||
0x07, 0x0b, 0x04, 0x43, 0x0a, 0x00, 0xfe, 0x04,
|
||||
0x43, 0x5c, 0x00, 0xfe, 0x03, 0x00, 0x01, 0x31 };
|
||||
|
||||
uint8_t cc[] = {
|
||||
static const uint8_t cc[] = {
|
||||
0x02, 0x01, 0x04,
|
||||
0x00, 0x01, 0x01, 0xb4, 0x02, 0x01, 0x00 };
|
||||
|
||||
|
||||
struct result {
|
||||
uint8_t *input;
|
||||
const uint8_t *input;
|
||||
int inp_len;
|
||||
const uint8_t *expected;
|
||||
int exp_len;
|
||||
|
@ -77,7 +77,7 @@ static struct result results[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static uint8_t udt_with_poi[] = {
|
||||
static const uint8_t udt_with_poi[] = {
|
||||
0x09, 0x00, 0x03,
|
||||
0x07, 0x0b, 0x04, 0x43, 0x0a, 0x00, 0xfe, 0x04,
|
||||
0x43, 0x5c, 0x00, 0xfe, 0x10, 0x00, 0x0e, 0x44,
|
||||
|
@ -92,7 +92,7 @@ static const uint8_t udt_without_poi[] = {
|
|||
0x04, 0x01, 0x00, 0x01, 0x00, 0x01, 0x1e, 0x05,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x40 };
|
||||
|
||||
static uint8_t cr_with_poi [] = {
|
||||
static const uint8_t cr_with_poi [] = {
|
||||
0x01, 0x01, 0x04,
|
||||
0x00, 0x02, 0x02, 0x06, 0x04, 0xc3, 0x5c, 0x00,
|
||||
0xfe, 0x0f, 0x21, 0x00, 0x1f, 0x57, 0x05, 0x08,
|
||||
|
@ -110,7 +110,7 @@ static const uint8_t cr_without_poi [] = {
|
|||
0x81, 0x08, 0x29, 0x47, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0x21, 0x01, 0x00 };
|
||||
|
||||
static uint8_t cr2_without_poi[] = {
|
||||
static const uint8_t cr2_without_poi[] = {
|
||||
0x01, 0x00, 0x00, 0x03, 0x02, 0x02, 0x04, 0x02,
|
||||
0x42, 0xfe, 0x0f, 0x1f, 0x00, 0x1d, 0x57, 0x05,
|
||||
0x08, 0x00, 0x72, 0xf4, 0x80, 0x20, 0x1d, 0xc3,
|
||||
|
@ -118,17 +118,17 @@ static uint8_t cr2_without_poi[] = {
|
|||
0x18, 0x93, 0x08, 0x29, 0x47, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0x00};
|
||||
|
||||
static uint8_t dt1_cc_confirmed[] = {
|
||||
static const uint8_t dt1_cc_confirmed[] = {
|
||||
0x06, 0x01, 0x0b, 0xef, 0x00, 0x01, 0x0e, 0x01,
|
||||
0x00, 0x0b, 0x83, 0x48, 0x04, 0x04, 0x20, 0x02,
|
||||
0x00, 0x81, 0x15, 0x01, 0x01};
|
||||
|
||||
static uint8_t dt1_cc_confirmed_hr3[] = {
|
||||
static const uint8_t dt1_cc_confirmed_hr3[] = {
|
||||
0x06, 0x01, 0x0b, 0xef, 0x00, 0x01, 0x0e, 0x01,
|
||||
0x00, 0x0b, 0x83, 0x48, 0x04, 0x04, 0x40, 0x05,
|
||||
0x00, 0x81, 0x15, 0x01, 0x01};
|
||||
|
||||
static uint8_t dt1_cc_setup[] = {
|
||||
static const uint8_t dt1_cc_setup[] = {
|
||||
0x06, 0x01, 0x0b, 0xdb, 0x00, 0x01, 0x16, 0x01,
|
||||
0x00, 0x13, 0x03, 0x45, 0x04, 0x06, 0x60, 0x04,
|
||||
0x02, 0x00, 0x05, 0x81, 0x5e, 0x07, 0x91, 0x19,
|
||||
|
@ -173,12 +173,12 @@ static struct result rewrite_results_to_msc[] = {
|
|||
};
|
||||
|
||||
|
||||
uint8_t paging_cmd[] = {
|
||||
static const uint8_t paging_cmd[] = {
|
||||
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x0a,
|
||||
0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x10,
|
||||
0x00, 0x0e, 0x52, 0x08, 0x08, 0x29, 0x80, 0x10,
|
||||
0x76, 0x10, 0x77, 0x46, 0x05, 0x1a, 0x01, 0x06 };
|
||||
uint8_t paging_cmd_patched[] = {
|
||||
static const uint8_t paging_cmd_patched[] = {
|
||||
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x02,
|
||||
0x00, 0xfe, 0x04, 0x43, 0x01, 0x00, 0xfe, 0x10,
|
||||
0x00, 0x0e, 0x52, 0x08, 0x08, 0x29, 0x80, 0x10,
|
||||
|
|
Reference in New Issue