summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/sbus_codegen_tests.c15
-rw-r--r--src/tests/sbus_codegen_tests_generated.h17
2 files changed, 32 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);
diff --git a/src/tests/sbus_codegen_tests_generated.h b/src/tests/sbus_codegen_tests_generated.h
index 3f7621588..f41eca74b 100644
--- a/src/tests/sbus_codegen_tests_generated.h
+++ b/src/tests/sbus_codegen_tests_generated.h
@@ -6,6 +6,23 @@
#include "sbus/sssd_dbus.h"
/* ------------------------------------------------------------------------
+ * DBus Constants
+ *
+ * Various constants of interface and method names mostly for use by clients
+ */
+
+/* constants for com.planetexpress.Ship */
+#define COM_PLANETEXPRESS_SHIP "com.planetexpress.Ship"
+#define COM_PLANETEXPRESS_SHIP_MOVEUNIVERSE "MoveUniverse"
+#define COM_PLANETEXPRESS_SHIP_CRASH_NOW "Crash"
+#define COM_PLANETEXPRESS_SHIP_BECAMESENTIENT "BecameSentient"
+#define COM_PLANETEXPRESS_SHIP_COLOR "Color"
+
+/* constants for com.planetexpress.Pilot */
+#define TEST_PILOT "com.planetexpress.Pilot"
+#define TEST_PILOT_FULLNAME "FullName"
+
+/* ------------------------------------------------------------------------
* DBus Vtable handler structures
*
* These structures are filled in by implementors of the different