[glib] tests: Add an assertion to guard against unexpected flags



commit ba874a8580a1ff4af921ffcf42512101b1e7ec28
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Sat Aug 13 10:28:24 2016 +0200

    tests: Add an assertion to guard against unexpected flags
    
    This should not change the behaviour of the test, unless the test's
    behaviour is changed in future. As spotted by cppcheck, which has
    impeccable taste and a flair for the unexpected.

 glib/tests/markup-parse.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/markup-parse.c b/glib/tests/markup-parse.c
index 7f04f4c..2ec30d0 100644
--- a/glib/tests/markup-parse.c
+++ b/glib/tests/markup-parse.c
@@ -240,6 +240,8 @@ get_expected_filename (const gchar       *filename,
     expected = g_strconcat (f, ".expected", NULL);
   else if (flags == G_MARKUP_TREAT_CDATA_AS_TEXT)
     expected = g_strconcat (f, ".cdata-as-text", NULL);
+  else
+    g_assert_not_reached ();
 
   g_free (f);
 


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