Skip to content

Commit

Permalink
libkvs/test/kvs_dir: Add extra corner case test
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Aug 22, 2017
1 parent 6df7aa8 commit 229cf18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/libkvs/test/kvs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ void test_empty (void)
errno = 0;
dir = kvsdir_create (NULL, NULL, "foo",
"{\"data\":\"MQA=\",\"type\":\"FOO\",\"ver\":1}");
ok (dir == NULL && errno == EINVAL,
"kvsdir_create with invalid treeobj fails with EINVAL");

errno = 0;
dir = kvsdir_create (NULL, NULL, "foo",
"{\"data\":\"MQA=\",\"type\":\"val\",\"ver\":1}");
ok (dir == NULL && errno == EINVAL,
"kvsdir_create with non-dir treeobj fails with EINVAL");

Expand Down

0 comments on commit 229cf18

Please sign in to comment.