forked from jchunky/GildedRose-Refactoring-Kata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGildedRoseUnitTests.cc
43 lines (37 loc) · 971 Bytes
/
GildedRoseUnitTests.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <CppUTest/TestHarness.h>
#include <CppUTest/CommandLineTestRunner.h>
#include <CppUTestExt/MockSupport.h>
extern "C" {
#include "GildedRose.h"
}
TEST_GROUP(TestGildedRoseGroup)
{
void setup() {
}
void teardown() {
}
};
TEST(TestGildedRoseGroup, FirstTest)
{
Item items[2];
init_item(items, "Foo", 0, 0);
update_quality(items, 1);
STRCMP_EQUAL("fixme", items[0].name);
}
void example()
{
Item items[6];
int last = 0;
init_item(items + last++, "+5 Dexterity Vest", 10, 20);
init_item(items + last++, "Aged Brie", 2, 0);
init_item(items + last++, "Elixir of the Mongoose", 5, 7);
init_item(items + last++, "Sulfuras, Hand of Ragnaros", 0, 80);
init_item(items + last++, "Backstage passes to a TAFKAL80ETC concert", 15, 20);
init_item(items + last++, "Conjured Mana Cake", 3, 6);
update_quality(items, last);
}
int
main(int ac, char** av)
{
return CommandLineTestRunner::RunAllTests(ac, av);
}