Browse Source

Increased the test coverage of json_c_version.c 0% to 100%.

pull/529/head
chenguoping 5 years ago
parent
commit
0c5c81f726
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      tests/test_util_file.c

+ 4
- 0
tests/test_util_file.c View File

@@ -16,10 +16,12 @@
#endif /* HAVE_UNISTD_H */
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>

#include "json.h"
#include "json_util.h"
#include "snprintf_compat.h"
#include "json_util.h"

static void test_read_valid_with_fd(const char *testdir);
static void test_read_valid_nested_with_fd(const char *testdir);
@@ -142,6 +144,8 @@ int main(int argc, char **argv)
}
testdir = argv[1];

assert(NULL != json_c_version());
assert(0 != json_c_version_num());
test_read_valid_with_fd(testdir);
test_read_valid_nested_with_fd(testdir);
test_read_nonexistant();


Loading…
Cancel
Save