-
Notifications
You must be signed in to change notification settings - Fork 0
/
GildedRoseTextTests.cc
42 lines (35 loc) · 1.25 KB
/
GildedRoseTextTests.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
#include "GildedRose.h"
#include <iostream>
using namespace std;
ostream& operator<<(ostream& s, Item& item)
{
s << item.name << ", " << item.sellIn << ", " << item.quality;
return s;
}
int main()
{
vector<Item> items;
items.push_back(Item("+5 Dexterity Vest", 10, 20));
items.push_back(Item("Aged Brie", 2, 0));
items.push_back(Item("Elixir of the Mongoose", 5, 7));
items.push_back(Item("Sulfuras, Hand of Ragnaros", 0, 80));
items.push_back(Item("Sulfuras, Hand of Ragnaros", -1, 80));
items.push_back(Item("Backstage passes to a TAFKAL80ETC concert", 15, 20));
items.push_back(Item("Backstage passes to a TAFKAL80ETC concert", 10, 49));
items.push_back(Item("Backstage passes to a TAFKAL80ETC concert", 5, 49));
// this Conjured item doesn't yet work properly
items.push_back(Item("Conjured Mana Cake", 3, 6));
GildedRose app(items);
cout << "OMGHAI!" << endl;
for (int day = 0; day <= 30; day++)
{
cout << "-------- day " << day << " --------" << endl;
cout << "name, sellIn, quality" << endl;
for (vector<Item>::iterator i = items.begin(); i != items.end(); i++)
{
cout << *i << endl;
}
cout << endl;
app.updateQuality();
}
}