improve scanner api test coverage
authorMatthias Clasen <mclasen@redhat.com>
Sat, 31 Jul 2010 06:39:53 +0000 (02:39 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 31 Jul 2010 06:39:53 +0000 (02:39 -0400)
glib/tests/scannerapi.c

index d33fed9..85cd92c 100644 (file)
@@ -96,7 +96,10 @@ test_scanner_symbols (ScannerFixture *fix,
                                 g_ascii_dtostr (buf, 2, (gdouble)i),
                                 GINT_TO_POINTER (i));
   g_scanner_scope_foreach_symbol (fix->scanner, 1, check_keys, NULL);
+  g_assert_cmpint (GPOINTER_TO_INT (g_scanner_lookup_symbol (fix->scanner, "5")), ==, 5);
   g_scanner_scope_remove_symbol (fix->scanner, 1, "5");
+  g_assert (g_scanner_lookup_symbol (fix->scanner, "5") == NULL);
+
   g_assert_cmpint (GPOINTER_TO_INT (g_scanner_scope_lookup_symbol (fix->scanner, 1, "4")), ==, 4);
   g_assert_cmpint (GPOINTER_TO_INT (g_scanner_scope_lookup_symbol (fix->scanner, 1, "5")), ==, 0);
 }