summaryrefslogtreecommitdiffstats
path: root/src/tests/sbus_codegen_tests.c
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-01-10 11:08:16 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-02-24 11:15:02 +0100
commitc2cc119de8eac712c040b3993f41c967ff2278de (patch)
tree78d67aaa9467a1f5cf4ab5fcfe76c3eed7fb50c1 /src/tests/sbus_codegen_tests.c
parent769347ad4d35d43488eb98f980143495b0db415d (diff)
downloadsssd-c2cc119de8eac712c040b3993f41c967ff2278de.tar.gz
sssd-c2cc119de8eac712c040b3993f41c967ff2278de.tar.xz
sssd-c2cc119de8eac712c040b3993f41c967ff2278de.zip
sbus: Generate constants from interface definitions
This is not strictly necessary, but avoids duplicating data in mulitple places, and makes the interface definitions benefit dbus callers (a little). After applying this commit you may need to 'make clean' as the codegen has changed. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/tests/sbus_codegen_tests.c')
-rw-r--r--src/tests/sbus_codegen_tests.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/sbus_codegen_tests.c b/src/tests/sbus_codegen_tests.c
index 39856fac7..7386756cd 100644
--- a/src/tests/sbus_codegen_tests.c
+++ b/src/tests/sbus_codegen_tests.c
@@ -144,6 +144,20 @@ START_TEST(test_vtable)
}
END_TEST
+START_TEST(test_constants)
+{
+ ck_assert_str_eq(COM_PLANETEXPRESS_SHIP, "com.planetexpress.Ship");
+ ck_assert_str_eq(COM_PLANETEXPRESS_SHIP_MOVEUNIVERSE, "MoveUniverse");
+ ck_assert_str_eq(COM_PLANETEXPRESS_SHIP_CRASH_NOW, "Crash");
+ ck_assert_str_eq(COM_PLANETEXPRESS_SHIP_BECAMESENTIENT, "BecameSentient");
+ ck_assert_str_eq(COM_PLANETEXPRESS_SHIP_COLOR, "Color");
+
+ /* constants for com.planetexpress.Pilot */
+ ck_assert_str_eq(TEST_PILOT, "com.planetexpress.Pilot");
+ ck_assert_str_eq(TEST_PILOT_FULLNAME, "FullName");
+}
+END_TEST
+
Suite *create_suite(void)
{
Suite *s = suite_create("sbus_codegen");
@@ -156,6 +170,7 @@ Suite *create_suite(void)
tcase_add_test(tc, test_properties);
tcase_add_test(tc, test_signals);
tcase_add_test(tc, test_vtable);
+ tcase_add_test(tc, test_constants);
/* Add all test cases to the test suite */
suite_add_tcase(s, tc);