[gtk+] testsuite: Add icontheme tests for generic fallback
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testsuite: Add icontheme tests for generic fallback
- Date: Wed, 14 May 2014 02:59:45 +0000 (UTC)
commit 26c2975007939c5d94d7606567166f090a3a6eaf
Author: Matthias Clasen <mclasen redhat com>
Date: Tue May 13 15:23:53 2014 +0200
testsuite: Add icontheme tests for generic fallback
testsuite/gtk/icontheme.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c
index b32d622..0392708 100644
--- a/testsuite/gtk/icontheme.c
+++ b/testsuite/gtk/icontheme.c
@@ -107,6 +107,29 @@ test_basics (void)
}
static void
+test_generic_fallback (void)
+{
+ /* simple test for generic fallback */
+ assert_icon_lookup ("simple-foo-bar",
+ 16,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ "/icons/16x16/simple.png");
+
+ /* Check generic fallback also works for symbolics falling back to regular items */
+ assert_icon_lookup ("simple-foo-bar-symbolic",
+ 16,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ "/icons/16x16/simple.png");
+
+ /* Check we fall back to more generic symbolic icons before falling back to
+ * non-symbolics */
+ assert_icon_lookup ("everything-justregular-symbolic",
+ SCALABLE_IMAGE_SIZE,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ "/icons/scalable/everything-symbolic.svg");
+}
+
+static void
test_force_symbolic (void)
{
/* check forcing symbolic works */
@@ -212,6 +235,7 @@ main (int argc, char *argv[])
gtk_test_init (&argc, &argv);
g_test_add_func ("/icontheme/basics", test_basics);
+ g_test_add_func ("/icontheme/generic_fallback", test_generic_fallback);
g_test_add_func ("/icontheme/force-symbolic", test_force_symbolic);
g_test_add_func ("/icontheme/force-regular", test_force_regular);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]