summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKota Tsuyuzaki <bloodeagle40234@gmail.com>2015-03-30 12:30:39 +0900
committerKota Tsuyuzaki <bloodeagle40234@gmail.com>2015-03-30 12:30:39 +0900
commit3c4ff134cb9c7f4fa84140b60c7f50cda5c4bbd4 (patch)
treef9bbc36d4a34e0b3f5daf2e4425a31ea7c4b9772
parent309d7f1e4754ac448d8b098bd36287fa37a77475 (diff)
downloadliberasurecode-3c4ff134cb9c7f4fa84140b60c7f50cda5c4bbd4.tar.gz
Add a decode error test w/o metadata check
-rw-r--r--test/liberasurecode_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/liberasurecode_test.c b/test/liberasurecode_test.c
index 83fa072..b5dbe2e 100644
--- a/test/liberasurecode_test.c
+++ b/test/liberasurecode_test.c
@@ -437,6 +437,11 @@ static void test_decode_invalid_args()
// force_metadata_checks results in EINSUFFFRAGS
assert(rc == -EINSUFFFRAGS);
+ rc = liberasurecode_decode(desc, avail_frags, num_avail_frags,
+ strlen(fake_data), 0,
+ &decoded_data, &decoded_data_len);
+ assert(rc == -EBADHEADER);
+
// test with num_fragments < (k)
num_avail_frags = create_fake_frags_no_meta(&avail_frags, (null_args.k - 1),
" ", 1);