summaryrefslogtreecommitdiff
path: root/json-glib/tests/invalid.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-glib/tests/invalid.c')
-rw-r--r--json-glib/tests/invalid.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/json-glib/tests/invalid.c b/json-glib/tests/invalid.c
index cb5f818..5197e9f 100644
--- a/json-glib/tests/invalid.c
+++ b/json-glib/tests/invalid.c
@@ -16,14 +16,14 @@ test_invalid_bareword (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
+ g_assert_false (res);
g_assert_error (error, JSON_PARSER_ERROR, JSON_PARSER_ERROR_INVALID_BAREWORD);
if (g_test_verbose ())
@@ -43,15 +43,15 @@ test_invalid_assignment (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
- g_assert (error != NULL);
+ g_assert_false (res);
+ g_assert_nonnull (error);
if (g_test_verbose ())
g_print ("expected error: %s\n", error->message);
@@ -70,15 +70,15 @@ test_invalid_value (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
- g_assert (error != NULL);
+ g_assert_false (res);
+ g_assert_nonnull (error);
if (g_test_verbose ())
g_print ("expected error: %s\n", error->message);
@@ -97,15 +97,15 @@ test_invalid_array (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
- g_assert (error != NULL);
+ g_assert_false (res);
+ g_assert_nonnull (error);
if (g_test_verbose ())
g_print ("expected error: %s\n", error->message);
@@ -124,15 +124,15 @@ test_invalid_object (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
- g_assert (error != NULL);
+ g_assert_false (res);
+ g_assert_nonnull (error);
if (g_test_verbose ())
g_print ("expected error: %s\n", error->message);
@@ -151,14 +151,14 @@ test_missing_comma (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
+ g_assert_false (res);
g_assert_error (error, JSON_PARSER_ERROR, JSON_PARSER_ERROR_MISSING_COMMA);
if (g_test_verbose ())
@@ -178,14 +178,14 @@ test_trailing_comma (gconstpointer user_data)
gboolean res;
parser = json_parser_new ();
- g_assert (JSON_IS_PARSER (parser));
+ g_assert_true (JSON_IS_PARSER (parser));
if (g_test_verbose ())
g_print ("invalid data: '%s'...", json);
res = json_parser_load_from_data (parser, json, -1, &error);
- g_assert (!res);
+ g_assert_false (res);
g_assert_error (error, JSON_PARSER_ERROR, JSON_PARSER_ERROR_TRAILING_COMMA);
if (g_test_verbose ())