projects
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c0a3b2
)
Avoid set-but-not-used warning/error in a test
author
Jim Meyering
<meyering@redhat.com>
Tue, 5 Apr 2011 12:04:16 +0000
(14:04 +0200)
committer
Petri Lehtinen
<petri@digip.org>
Tue, 5 Apr 2011 12:36:13 +0000
(15:36 +0300)
Closes GH-20.
test/suites/api/test_load.c
patch
|
blob
|
history
diff --git
a/test/suites/api/test_load.c
b/test/suites/api/test_load.c
index
b1679a3
..
ecb46d8
100644
(file)
--- a/
test/suites/api/test_load.c
+++ b/
test/suites/api/test_load.c
@@
-15,6
+15,8
@@
int main()
json_error_t error;
json = json_load_file("/path/to/nonexistent/file.json", 0, &error);
+ if(json)
+ fail("json_load_file returned non-NULL for a nonexistent file");
if(error.line != -1)
fail("json_load_file returned an invalid line number");
if(strcmp(error.text, "unable to open /path/to/nonexistent/file.json: No such file or directory") != 0)