mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
Moved gtest to a new file
This commit is contained in:
parent
e8cfd96ccf
commit
b6553ce2f1
@ -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
GildedRose/cpp/GildedRoseUnitTests.cc
Normal file
12
GildedRose/cpp/GildedRoseUnitTests.cc
Normal 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);
|
||||
}
|
||||
|
||||
@ -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 $@
|
||||
|
||||
Loading…
Reference in New Issue
Block a user