From f6fa6861862acfcd55410716403e61cd66149769 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 30 Jan 2009 12:01:46 +0000 Subject: Add a test that asserts that TP_ERRORS contains every error defined by the spec Now that we don't auto-generate TP_ERRORS, we need to verify that errors added in the spec get added to the TpError enum by the maintainer when a new spec is imported. This is done by generating a test that will be run during `make check`. Sample output: /* org.freedesktop.Telepathy.Error.Busy */ value_by_name = g_enum_get_value_by_name (klass, "TP_ERROR_BUSY"); value_by_nick = g_enum_get_value_by_nick (klass, "Busy"); g_assert (value_by_name != NULL); g_assert (value_by_nick != NULL); g_assert_cmpint (value_by_name->value, ==, TP_ERROR_BUSY); g_assert_cmpint (value_by_nick->value, ==, TP_ERROR_BUSY); g_assert_cmpstr (value_by_name->value_name, ==, "TP_ERROR_BUSY"); g_assert_cmpstr (value_by_nick->value_name, ==, "TP_ERROR_BUSY"); g_assert_cmpstr (value_by_name->value_nick, ==, "Busy"); g_assert_cmpstr (value_by_nick->value_nick, ==, "Busy"); --- .gitignore | 1 + 1 file changed, 1 insertion(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index 54aeb88c5..d7f8bfdf5 100644 --- a/.gitignore +++ b/.gitignore @@ -78,6 +78,7 @@ tests/dbus/test-contacts-bug-19101 tests/dbus/test-contacts-mixin tests/dbus/test-dbus tests/dbus/test-disconnection +tests/dbus/test-error-enum tests/dbus/test-example-no-protocols tests/dbus/test-finalized-in-invalidated-handler tests/dbus/test-group-mixin -- cgit v1.2.1