From 989cd2fd8191fd63f970c28a161b9fb2371a283c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 8 Jan 2013 22:30:01 -0800 Subject: [PATCH] unit: Add advertising data from Wahoo BlueSC for testing --- unit/test-eir.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/unit/test-eir.c b/unit/test-eir.c index e7c742c3f..be2282c82 100644 --- a/unit/test-eir.c +++ b/unit/test-eir.c @@ -153,7 +153,7 @@ static const unsigned char ipadmini_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const struct test_data ipadmini_test = { @@ -194,7 +194,7 @@ static const unsigned char fuelband_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const struct test_data fuelband_test = { @@ -205,6 +205,21 @@ static const struct test_data fuelband_test = { .name_complete = TRUE, }; +static const unsigned char bluesc_data[] = { + 0x02, 0x01, 0x06, 0x03, 0x02, 0x16, 0x18, 0x12, + 0x09, 0x57, 0x61, 0x68, 0x6f, 0x6f, 0x20, 0x42, + 0x6c, 0x75, 0x65, 0x53, 0x43, 0x20, 0x76, 0x31, + 0x2e, 0x34, +}; + +static const struct test_data bluesc_test = { + .eir_data = bluesc_data, + .eir_size = sizeof(bluesc_data), + .flags = 0x06, + .name = "Wahoo BlueSC v1.4", + .name_complete = TRUE, +}; + static void test_basic(void) { struct eir_data data; @@ -256,6 +271,7 @@ int main(int argc, char *argv[]) g_test_add_data_func("/eir/iphone5", &iphone5_test, test_parsing); g_test_add_data_func("/eir/ipadmini", &ipadmini_test, test_parsing); g_test_add_data_func("/eir/fuelband", &fuelband_test, test_parsing); + g_test_add_data_func("/ad/bluesc", &bluesc_test, test_parsing); return g_test_run(); } -- 2.47.3