diff --git a/c-check/test_normal.c b/c-check/test_normal.c index acf0e0b8..30332830 100644 --- a/c-check/test_normal.c +++ b/c-check/test_normal.c @@ -46,6 +46,16 @@ START_TEST(normalitem_whenSellInNegative_decreasesByTwo) } END_TEST +START_TEST(normalitem_whenSellInZero_decreasesByTwo) +{ + Item items[1]; + init_item(items, NORMAL_ITEM, -1, 15); + update_quality(items, 1); + + ck_assert_int_eq(13, items[0].quality); +} +END_TEST + TCase *tcase_normal(void) { TCase *tc; @@ -55,6 +65,7 @@ TCase *tcase_normal(void) tcase_add_test(tc, normalitem_whenSellIsZero_decreasesQualityByTwo); tcase_add_test(tc, normalitem_whenQualityZero_doesNotDecrease); tcase_add_test(tc, normalitem_whenSellInNegative_decreasesByTwo); + tcase_add_test(tc, normalitem_whenSellInZero_decreasesByTwo); return tc; }