summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordota17 <chenguopingdota@163.com>2020-04-15 20:06:12 +0800
committerdota17 <chenguopingdota@163.com>2020-04-15 20:06:12 +0800
commitb14363ae323b189ed2d764672c6607912ff35398 (patch)
treeb0bde3743d50907d0dd3a2711c97459d5239b290
parent2876fcc1370ae87fa6f748ff0326b2bc0a7c2897 (diff)
downloadjson-c-b14363ae323b189ed2d764672c6607912ff35398.tar.gz
remove unsuitable case
-rw-r--r--tests/test_util_file.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/test_util_file.c b/tests/test_util_file.c
index ecd1713..2f8f8b5 100644
--- a/tests/test_util_file.c
+++ b/tests/test_util_file.c
@@ -84,21 +84,7 @@ static void test_write_to_file()
if (rv == 0)
stat_and_cat(outfile3);
- const char *outfile4 = "./test_cast.test";
- json_object_to_file_ext(outfile4, jso, JSON_C_TO_STRING_PRETTY);
- json_object *new_jso = NULL;
- assert(-1 == json_object_to_file(outfile4, new_jso));
- d = open(outfile4, O_WRONLY | O_CREAT, 0600);
- if (d < 0)
- {
- printf("FAIL: unable to open %s %s\n", outfile4, strerror(errno));
- return;
- }
- assert(-1 == json_object_to_fd(d, new_jso, JSON_C_TO_STRING_PRETTY));
- close(d);
-
json_object_put(jso);
- json_object_put(new_jso);
}
static void stat_and_cat(const char *file)
@@ -141,8 +127,6 @@ int main(int argc, char **argv)
// json_object_to_file(file, obj);
// json_object_to_file_ext(file, obj, flags);
- _json_c_strerror(0);
- json_util_get_last_err();
_json_c_strerror_enable = 1;
const char *testdir;
@@ -305,7 +289,6 @@ static void test_read_fd_equal(const char *testdir)
json_object *jso = json_object_from_file(filename);
- assert(NULL == json_type_to_name(20));
int d = open(filename, O_RDONLY, 0);
if (d < 0)
{