diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-11-19 21:49:25 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-12-01 11:34:29 +0400 |
commit | bc05f30c470f7d147ff85b30ad5719bbce70a4a3 (patch) | |
tree | 5a425363075c894533f8bd80fcefb7bcfc289ca7 /tests-clar/object | |
parent | 621730383a2298431fd3ea3cbc754f7cf18a1eba (diff) |
object: refine git_object_peel() error report
Diffstat (limited to 'tests-clar/object')
-rw-r--r-- | tests-clar/object/peel.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests-clar/object/peel.c b/tests-clar/object/peel.c index a19772858..bb0bbd096 100644 --- a/tests-clar/object/peel.c +++ b/tests-clar/object/peel.c @@ -79,12 +79,12 @@ void test_object_peel__can_peel_a_commit(void) void test_object_peel__cannot_peel_a_tree(void) { - assert_peel_error(GIT_ERROR, "53fc32d17276939fc79ed05badaef2db09990016", GIT_OBJ_BLOB); + assert_peel_error(GIT_EAMBIGUOUS, "53fc32d17276939fc79ed05badaef2db09990016", GIT_OBJ_BLOB); } void test_object_peel__cannot_peel_a_blob(void) { - assert_peel_error(GIT_ERROR, "0266163a49e280c4f5ed1e08facd36a2bd716bcf", GIT_OBJ_COMMIT); + assert_peel_error(GIT_ENOTFOUND, "0266163a49e280c4f5ed1e08facd36a2bd716bcf", GIT_OBJ_COMMIT); } void test_object_peel__target_any_object_for_type_change(void) @@ -98,8 +98,13 @@ void test_object_peel__target_any_object_for_type_change(void) "53fc32d17276939fc79ed05badaef2db09990016", GIT_OBJ_TREE); /* fail to peel tree */ - assert_peel_error(GIT_ERROR, "53fc32d17276939fc79ed05badaef2db09990016", GIT_OBJ_ANY); + assert_peel_error(GIT_EAMBIGUOUS, "53fc32d17276939fc79ed05badaef2db09990016", GIT_OBJ_ANY); /* fail to peel blob */ - assert_peel_error(GIT_ERROR, "0266163a49e280c4f5ed1e08facd36a2bd716bcf", GIT_OBJ_ANY); + assert_peel_error(GIT_ENOTFOUND, "0266163a49e280c4f5ed1e08facd36a2bd716bcf", GIT_OBJ_ANY); +} + +void test_object_peel__should_use_a_well_known_type(void) +{ + assert_peel_error(GIT_EINVALIDSPEC, "7b4384978d2493e851f9cca7858815fac9b10980", GIT_OBJ__EXT2); } |