[Testing] Engine: Provide checked error messages to replace noted warnings

Much better for expected warnings to be tested for than to have a lead-in message saying that they're really OK.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21676 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2011-12-05 00:08:01 +00:00
parent 5e355a56c4
commit 02071518ee

View File

@ -51,8 +51,17 @@ static void test_class (void)
{ NULL },
};
fprintf (stderr, "\tTesting the qof_query_object interface. \n"
"\tYou may see some \"** CRITICAL **\" messages, which you can safely ignore\n");
gchar *msg1 = "qof_class_get_parameter: assertion `obj_name' failed";
gchar *msg2 = "qof_class_get_parameter: assertion `parameter' failed";
gchar *logdomain = "qof";
guint loglevel = G_LOG_LEVEL_CRITICAL;
TestErrorStruct check1 = { loglevel, logdomain, msg1 };
TestErrorStruct check2 = { loglevel, logdomain, msg2 };
test_add_error (&check1);
test_add_error (&check2);
g_log_set_handler (logdomain, loglevel,
(GLogFunc)test_list_handler, NULL);
qof_class_register (TEST_MODULE_NAME, (QofSortFunc)test_sort, params);
@ -79,6 +88,7 @@ static void test_class (void)
"qof_class_get_default_sort");
do_test (qof_class_get_default_sort (NULL) == NULL,
"qof_class_get_default_sort (NULL)");*/
test_clear_error_list ();
}
static void test_query_core (void)