OSDN Git Service

unit: Add inquiry data from Gigaset SL400H and SL910 for teseting
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 25 Jan 2013 00:55:59 +0000 (01:55 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 25 Jan 2013 00:57:37 +0000 (01:57 +0100)
unit/test-eir.c

index 7c9b5ba..bb82564 100644 (file)
@@ -164,6 +164,88 @@ static const struct test_data ipadmini_test = {
        .name_complete = TRUE,
 };
 
+static const unsigned char gigaset_sl400h_data[] = {
+               0x0b, 0x03, 0x01, 0x11, 0x05, 0x11, 0x12, 0x11,
+               0x03, 0x12, 0x1f, 0x11, 0x10, 0x09, 0x4d, 0x61,
+               0x72, 0x63, 0x65, 0x6c, 0x27, 0x73, 0x20, 0x53,
+               0x4c, 0x34, 0x30, 0x30, 0x48, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               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 gigaset_sl400h_test = {
+       .eir_data = gigaset_sl400h_data,
+       .eir_size = sizeof(gigaset_sl400h_data),
+       .flags = -1,
+       .name = "Marcel's SL400H",
+       .name_complete = TRUE,
+};
+
+static const unsigned char gigaset_sl910_data[] = {
+               0x0b, 0x03, 0x01, 0x11, 0x05, 0x11, 0x12, 0x11,
+               0x03, 0x12, 0x1f, 0x11, 0x0f, 0x09, 0x4d, 0x61,
+               0x72, 0x63, 0x65, 0x6c, 0x27, 0x73, 0x20, 0x53,
+               0x4c, 0x39, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+               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 gigaset_sl910_test = {
+       .eir_data = gigaset_sl910_data,
+       .eir_size = sizeof(gigaset_sl910_data),
+       .flags = -1,
+       .name = "Marcel's SL910",
+       .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,
@@ -344,6 +426,8 @@ 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/sl400h", &gigaset_sl400h_test, test_parsing);
+       g_test_add_data_func("/eir/sl910", &gigaset_sl910_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);
        g_test_add_data_func("/ad/wahooscale", &wahoo_scale_test, test_parsing);