diff --git a/unit/test-eir.c b/unit/test-eir.c
index b876e11..a3c7cef 100644
--- a/unit/test-eir.c
+++ b/unit/test-eir.c
gboolean name_complete;
};
-static const unsigned char apple_data_1[] = {
+static const unsigned char macbookair_data[] = {
0x17, 0x09, 0x4d, 0x61, 0x72, 0x63, 0x65, 0x6c,
0xe2, 0x80, 0x99, 0x73, 0x20, 0x4d, 0x61, 0x63,
0x42, 0x6f, 0x6f, 0x6b, 0x20, 0x41, 0x69, 0x72,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
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 apple_test_1 = {
- .eir_data = apple_data_1,
- .eir_size = sizeof(apple_data_1),
+static const struct test_data macbookair_test = {
+ .eir_data = macbookair_data,
+ .eir_size = sizeof(macbookair_data),
.flags = -1,
.name = "Marcel’s MacBook Air",
.name_complete = TRUE,
};
+static const unsigned char iphone5_data[] = {
+ 0x14, 0x09, 0x4d, 0x61, 0x72, 0x63, 0x65, 0x6c,
+ 0xe2, 0x80, 0x99, 0x73, 0x20, 0x69, 0x50, 0x68,
+ 0x6f, 0x6e, 0x65, 0x20, 0x35, 0x0f, 0x03, 0x00,
+ 0x12, 0x1f, 0x11, 0x2f, 0x11, 0x0a, 0x11, 0x0c,
+ 0x11, 0x16, 0x11, 0x32, 0x11, 0x01, 0x05, 0x11,
+ 0x07, 0xfe, 0xca, 0xca, 0xde, 0xaf, 0xde, 0xca,
+ 0xde, 0xde, 0xfa, 0xca, 0xde, 0x00, 0x00, 0x00,
+ 0x00, 0x27, 0xff, 0x00, 0x4c, 0x02, 0x24, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 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 iphone5_test = {
+ .eir_data = iphone5_data,
+ .eir_size = sizeof(iphone5_data),
+ .flags = -1,
+ .name = "Marcel’s iPhone 5",
+ .name_complete = TRUE,
+};
+
+static const unsigned char ipadmini_data[] = {
+ 0x13, 0x09, 0x4d, 0x61, 0x72, 0x63, 0x65, 0x6c,
+ 0x27, 0x73, 0x20, 0x69, 0x50, 0x61, 0x64, 0x20,
+ 0x6d, 0x69, 0x6e, 0x69, 0x0b, 0x03, 0x00, 0x12,
+ 0x1f, 0x11, 0x0a, 0x11, 0x0c, 0x11, 0x32, 0x11,
+ 0x01, 0x05, 0x11, 0x07, 0xfe, 0xca, 0xca, 0xde,
+ 0xaf, 0xde, 0xca, 0xde, 0xde, 0xfa, 0xca, 0xde,
+ 0x00, 0x00, 0x00, 0x00, 0x27, 0xff, 0x00, 0x4c,
+ 0x02, 0x24, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 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 = {
+ .eir_data = ipadmini_data,
+ .eir_size = sizeof(ipadmini_data),
+ .flags = -1,
+ .name = "Marcel's iPad mini",
+ .name_complete = TRUE,
+};
+
static void test_basic(void)
{
struct eir_data data;
g_test_add_func("/eir/basic", test_basic);
- g_test_add_data_func("/eir/apple/1", &apple_test_1, test_parsing);
+ 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);
return g_test_run();
}