diff options
author | Christian Dywan <christian@twotoasts.de> | 2011-11-18 00:54:32 +0100 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2011-11-18 00:54:32 +0100 |
commit | a9e7115b179d50153d1ff9b590785198c3695a29 (patch) | |
tree | e27753c46b43921090e7fd07f0f88c21398295d4 /katze/katze-utils.c | |
parent | c0c909eb177c9e91cae18b34d6f184b546eceb33 (diff) | |
download | midori-a9e7115b179d50153d1ff9b590785198c3695a29.tar.gz |
Add simple regexp unit test to Addons extension
Diffstat (limited to 'katze/katze-utils.c')
-rw-r--r-- | katze/katze-utils.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/katze/katze-utils.c b/katze/katze-utils.c index 27b2e471..ac9df02d 100644 --- a/katze/katze-utils.c +++ b/katze/katze-utils.c @@ -1561,3 +1561,27 @@ katze_uri_entry_new (GtkWidget* other_widget) return entry; } +/** + * katze_assert_str_equal: + * @input: a string + * @result: a string + * @expected: a string + * + * Compares the two strings for equality, with verbose errors. + * + * Since: 0.4.3 + */ +void +katze_assert_str_equal (const gchar* input, + const gchar* result, + const gchar* expected) +{ + if (g_strcmp0 (result, expected)) + { + g_error ("Input: %s\nExpected: %s\nResult: %s", + input ? input : "NULL", + expected ? expected : "NULL", + result ? result : "NULL"); + } +} + |