diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-17 10:40:13 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-17 10:54:03 +0000 |
| commit | cd350852206481e984f7847a903de8d350ad7bf1 (patch) | |
| tree | 8d175334bc10172bcd2e28052517771a492ad16d /tests/object | |
| parent | 90046899572f7230ceeab5fef3a909f53f817ba1 (diff) | |
| download | libgit2-cd350852206481e984f7847a903de8d350ad7bf1.tar.gz | |
object_type: GIT_OBJECT_BAD is now GIT_OBJECT_INVALID
We use the term "invalid" to refer to bad or malformed data, eg
`GIT_REF_INVALID` and `GIT_EINVALIDSPEC`. Since we're changing the
names of the `git_object_t`s in this release, update it to be
`GIT_OBJECT_INVALID` instead of `BAD`.
Diffstat (limited to 'tests/object')
| -rw-r--r-- | tests/object/raw/data.h | 2 | ||||
| -rw-r--r-- | tests/object/raw/type2string.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/object/raw/data.h b/tests/object/raw/data.h index 07ace60fc..57431e70e 100644 --- a/tests/object/raw/data.h +++ b/tests/object/raw/data.h @@ -319,5 +319,5 @@ static git_rawobj some_obj = { static git_rawobj junk_obj = { NULL, 0, - GIT_OBJECT_BAD + GIT_OBJECT_INVALID }; diff --git a/tests/object/raw/type2string.c b/tests/object/raw/type2string.c index 0c2070500..ebd81f552 100644 --- a/tests/object/raw/type2string.c +++ b/tests/object/raw/type2string.c @@ -6,7 +6,7 @@ void test_object_raw_type2string__convert_type_to_string(void) { - cl_assert_equal_s(git_object_type2string(GIT_OBJECT_BAD), ""); + cl_assert_equal_s(git_object_type2string(GIT_OBJECT_INVALID), ""); cl_assert_equal_s(git_object_type2string(0), ""); /* EXT1 */ cl_assert_equal_s(git_object_type2string(GIT_OBJECT_COMMIT), "commit"); cl_assert_equal_s(git_object_type2string(GIT_OBJECT_TREE), "tree"); @@ -23,8 +23,8 @@ void test_object_raw_type2string__convert_type_to_string(void) void test_object_raw_type2string__convert_string_to_type(void) { - cl_assert(git_object_string2type(NULL) == GIT_OBJECT_BAD); - cl_assert(git_object_string2type("") == GIT_OBJECT_BAD); + cl_assert(git_object_string2type(NULL) == GIT_OBJECT_INVALID); + cl_assert(git_object_string2type("") == GIT_OBJECT_INVALID); cl_assert(git_object_string2type("commit") == GIT_OBJECT_COMMIT); cl_assert(git_object_string2type("tree") == GIT_OBJECT_TREE); cl_assert(git_object_string2type("blob") == GIT_OBJECT_BLOB); @@ -32,13 +32,13 @@ void test_object_raw_type2string__convert_string_to_type(void) cl_assert(git_object_string2type("OFS_DELTA") == GIT_OBJECT_OFS_DELTA); cl_assert(git_object_string2type("REF_DELTA") == GIT_OBJECT_REF_DELTA); - cl_assert(git_object_string2type("CoMmIt") == GIT_OBJECT_BAD); - cl_assert(git_object_string2type("hohoho") == GIT_OBJECT_BAD); + cl_assert(git_object_string2type("CoMmIt") == GIT_OBJECT_INVALID); + cl_assert(git_object_string2type("hohoho") == GIT_OBJECT_INVALID); } void test_object_raw_type2string__check_type_is_loose(void) { - cl_assert(git_object_typeisloose(GIT_OBJECT_BAD) == 0); + cl_assert(git_object_typeisloose(GIT_OBJECT_INVALID) == 0); cl_assert(git_object_typeisloose(0) == 0); /* EXT1 */ cl_assert(git_object_typeisloose(GIT_OBJECT_COMMIT) == 1); cl_assert(git_object_typeisloose(GIT_OBJECT_TREE) == 1); |
