Moved gtest to a new file

This commit is contained in:
Jonas Granquist committed 2012-02-25 08:59:26 +01:00
1 parent e8cfd96ccf
commit b6553ce2f1
3 files changed
+14 -12

No files matched your search

-10
View File
@@ -1,5 +1,3 @@
#include <gtest/gtest.h>
#include <string>
using namespace std;
@@ -113,11 +111,3 @@ void example()
}
TEST(GildedRoseTest, Foo) {
vector<Item> items;
items.push_back(Item("Foo", 0, 0));
GildedRose app(items);
app.updateQuality();
EXPECT_EQ("fixme", app.items[0].name);
}
+12
View File
@@ -0,0 +1,12 @@
#include <gtest/gtest.h>
#include "GildedRose.h"
TEST(GildedRoseTest, Foo) {
vector<Item> items;
items.push_back(Item("Foo", 0, 0));
GildedRose app(items);
app.updateQuality();
EXPECT_EQ("fixme", app.items[0].name);
}
+2 -2
View File
@@ -71,5 +71,5 @@ gtest_main.a : gtest-all.o gtest_main.o
# $(GTEST_HEADERS)
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/GildedRose.h
GildedRose : GildedRose.h gtest_main.a
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(USER_DIR)/GildedRose.h -pthread $^ -o $@
GildedRose : GildedRoseUnitTests.cc gtest_main.a
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -pthread $^ -o $@