Diff between 040000d653bcbf79614f22384b55ddebe3585257 and 989cd2fd8191fd63f970c28a161b9fb2371a283c

Changed Files

File Additions Deletions Status
unit/test-eir.c +18 -2 modified

Full Patch

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