From 040000d653bcbf79614f22384b55ddebe3585257 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 8 Jan 2013 20:10:02 -0800 Subject: [PATCH] unit: Add inquiry data from Nike+ FuelBand for testing --- unit/test-eir.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/unit/test-eir.c b/unit/test-eir.c index a3c7cefaf..e7c742c3f 100644 --- a/unit/test-eir.c +++ b/unit/test-eir.c @@ -164,6 +164,47 @@ static const struct test_data ipadmini_test = { .name_complete = TRUE, }; +static const unsigned char fuelband_data[] = { + 0x0f, 0x09, 0x4e, 0x69, 0x6b, 0x65, 0x2b, 0x20, + 0x46, 0x75, 0x65, 0x6c, 0x42, 0x61, 0x6e, 0x64, + 0x11, 0x07, 0x00, 0x00, 0x00, 0x00, 0xde, 0xca, + 0xfa, 0xde, 0xde, 0xca, 0xde, 0xaf, 0xde, 0xca, + 0xca, 0xff, 0x02, 0x0a, 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, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00 +}; + +static const struct test_data fuelband_test = { + .eir_data = fuelband_data, + .eir_size = sizeof(fuelband_data), + .flags = -1, + .name = "Nike+ FuelBand", + .name_complete = TRUE, +}; + static void test_basic(void) { struct eir_data data; @@ -214,6 +255,7 @@ int main(int argc, char *argv[]) g_test_add_data_func("/eir/macbookair", &macbookair_test, test_parsing); 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); return g_test_run(); } -- 2.47.3