Diff between 85f5c707b4cec6c360683adf93af71b208b94bd5 and 040000d653bcbf79614f22384b55ddebe3585257

Changed Files

File Additions Deletions Status
unit/test-eir.c +42 -0 modified

Full Patch

diff --git a/unit/test-eir.c b/unit/test-eir.c
index a3c7cef..e7c742c 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();
 }