starting position should include item printer

This commit is contained in:
emily 2020-06-05 15:36:03 +02:00
parent 3ee479a731
commit e1fdd00962

View File

@ -1,14 +1,21 @@
#include "catch2/catch.hpp" #include <catch2/catch.hpp>
#include "ApprovalTests.hpp" #include "ApprovalTests.hpp"
#include "GildedRose.h" #include "GildedRose.h"
TEST_CASE("Foo") { std::ostream& operator<<(std::ostream& os, const Item& obj)
{
return os
<< "name: " << obj.name
<< ", sellIn: " << obj.sellIn
<< ", quality: " << obj.quality;
}
TEST_CASE("UpdateQuality") {
vector<Item> items; vector<Item> items;
items.push_back(Item("foo", 0, 0)); items.push_back(Item("foo", 0, 0));
GildedRose app(items); GildedRose app(items);
app.updateQuality(); app.updateQuality();
REQUIRE("fixme" == app.items[0].name); REQUIRE("foo" == app.items[0].name);
} }