[gnome-software] tests: Drop a content rating test due to it being in appstream-glib



commit a975e2e863758143d2c555af14a245be4d053f4c
Author: Philip Withnall <withnall endlessm com>
Date:   Thu May 21 15:55:44 2020 +0100

    tests: Drop a content rating test due to it being in appstream-glib
    
    See the previous commit, and
    https://github.com/hughsie/appstream-glib/pull/364.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 src/gs-self-test.c | 53 -----------------------------------------------------
 1 file changed, 53 deletions(-)
---
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 0ed05c5b..8c335381 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -40,57 +40,6 @@ gs_css_func (void)
        g_assert_cmpstr (tmp, ==, "color: white;");
 }
 
-/* Test that gs_utils_content_rating_system_from_locale() returns the correct
- * rating system for various standard locales and various forms of locale name.
- * See `locale -a` for the list of all available locales which some of these
- * test vectors were derived from. */
-static void
-gs_content_rating_from_locale (void)
-{
-       const struct {
-               const gchar *locale;
-               GsContentRatingSystem expected_system;
-       } vectors[] = {
-               /* Simple tests to get coverage of each rating system: */
-               { "es_AR", GS_CONTENT_RATING_SYSTEM_INCAA },
-               { "en_AU", GS_CONTENT_RATING_SYSTEM_ACB },
-               { "pt_BR", GS_CONTENT_RATING_SYSTEM_DJCTQ },
-               { "zh_TW", GS_CONTENT_RATING_SYSTEM_GSRR },
-               { "en_GB", GS_CONTENT_RATING_SYSTEM_PEGI },
-               { "hy_AM", GS_CONTENT_RATING_SYSTEM_PEGI },
-               { "bg_BG", GS_CONTENT_RATING_SYSTEM_PEGI },
-               { "fi_FI", GS_CONTENT_RATING_SYSTEM_KAVI },
-               { "de_DE", GS_CONTENT_RATING_SYSTEM_USK },
-               { "az_IR", GS_CONTENT_RATING_SYSTEM_ESRA },
-               { "jp_JP", GS_CONTENT_RATING_SYSTEM_CERO },
-               { "en_NZ", GS_CONTENT_RATING_SYSTEM_OFLCNZ },
-               { "ru_RU", GS_CONTENT_RATING_SYSTEM_RUSSIA },
-               { "en_SQ", GS_CONTENT_RATING_SYSTEM_MDA },
-               { "ko_KR", GS_CONTENT_RATING_SYSTEM_GRAC },
-               { "en_US", GS_CONTENT_RATING_SYSTEM_ESRB },
-               { "en_US", GS_CONTENT_RATING_SYSTEM_ESRB },
-               { "en_CA", GS_CONTENT_RATING_SYSTEM_ESRB },
-               { "es_MX", GS_CONTENT_RATING_SYSTEM_ESRB },
-               /* Fallback (arbitrarily chosen Venezuela since it seems to use IARC): */
-               { "es_VE", GS_CONTENT_RATING_SYSTEM_IARC },
-               /* Locale with a codeset: */
-               { "nl_NL.iso88591", GS_CONTENT_RATING_SYSTEM_PEGI },
-               /* Locale with a codeset and modifier: */
-               { "nl_NL.iso885915@euro", GS_CONTENT_RATING_SYSTEM_PEGI },
-               /* Locale with a less esoteric codeset: */
-               { "en_GB.UTF-8", GS_CONTENT_RATING_SYSTEM_PEGI },
-               /* Locale with a modifier but no codeset: */
-               { "fi_FI@euro", GS_CONTENT_RATING_SYSTEM_KAVI },
-               /* Invalid locale: */
-               { "_invalid", GS_CONTENT_RATING_SYSTEM_IARC },
-       };
-
-       for (gsize i = 0; i < G_N_ELEMENTS (vectors); i++) {
-               g_test_message ("Test %" G_GSIZE_FORMAT ": %s", i, vectors[i].locale);
-               g_assert_cmpint (gs_utils_content_rating_system_from_locale (vectors[i].locale), ==, 
vectors[i].expected_system);
-       }
-}
-
 int
 main (int argc, char **argv)
 {
@@ -106,8 +55,6 @@ main (int argc, char **argv)
 
        /* tests go here */
        g_test_add_func ("/gnome-software/src/css", gs_css_func);
-       g_test_add_func ("/gnome-software/src/content-rating/from-locale",
-                        gs_content_rating_from_locale);
 
        return g_test_run ();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]