[json-glib] tests/path: Start adding negative tests for JsonPath
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] tests/path: Start adding negative tests for JsonPath
- Date: Wed, 15 May 2013 20:52:14 +0000 (UTC)
commit e034cb033a6ba198cf22cd0601ab65bfd8c5b8dd
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed May 15 21:50:01 2013 +0100
tests/path: Start adding negative tests for JsonPath
json-glib/tests/path.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/json-glib/tests/path.c b/json-glib/tests/path.c
index d3aa74b..729a939 100644
--- a/json-glib/tests/path.c
+++ b/json-glib/tests/path.c
@@ -45,6 +45,20 @@ static const struct {
JsonPathError error_code;
} test_expressions[] = {
{
+ "INVALID: invalid character following root",
+ "$ponies",
+ NULL,
+ FALSE,
+ JSON_PATH_ERROR_INVALID_QUERY,
+ },
+ {
+ "INVALID: malformed splice",
+ "$.store.book[0:1:]",
+ NULL,
+ FALSE,
+ JSON_PATH_ERROR_INVALID_QUERY,
+ },
+ {
"Title of the first book in the store, using objct notation.",
"$.store.book[0].title",
"[\"Sayings of the Century\"]",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]