mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
Renamed to reflect actual contents
This commit is contained in:
parent
fe0cad5a72
commit
08cf17d6bc
@ -2,7 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <check.h>
|
||||
|
||||
Suite *suite_rose(void);
|
||||
Suite *suite_normal(void);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@ -15,7 +15,7 @@ int main(int argc, char **argv)
|
||||
forkme = 0;
|
||||
}
|
||||
|
||||
s = suite_rose();
|
||||
s = suite_normal();
|
||||
runner = srunner_create(s);
|
||||
|
||||
if (0 == forkme) {
|
||||
|
||||
@ -24,6 +24,16 @@ START_TEST(normalitem_whenSellIsZero_decreasesQualityByTwo)
|
||||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(normalitem_whenQualityZero_doesNotDecrease)
|
||||
{
|
||||
Item items[1];
|
||||
init_item(items, NORMAL_ITEM, 10, 0);
|
||||
update_quality(items, 1);
|
||||
|
||||
ck_assert_int_eq(0, items[0].quality);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
TCase *tcase_rose(void)
|
||||
{
|
||||
TCase *tc;
|
||||
@ -31,11 +41,12 @@ TCase *tcase_rose(void)
|
||||
tc = tcase_create("normal-items");
|
||||
tcase_add_test(tc, normalitem_whenSellInPositive_decreasesQualityByOne);
|
||||
tcase_add_test(tc, normalitem_whenSellIsZero_decreasesQualityByTwo);
|
||||
tcase_add_test(tc, normalitem_whenQualityZero_doesNotDecrease);
|
||||
|
||||
return tc;
|
||||
}
|
||||
|
||||
Suite *suite_rose(void)
|
||||
Suite *suite_normal(void)
|
||||
{
|
||||
Suite *s;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user