mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
* Make it possible to build and run tests in CLion
and Visual Studio 2019 out of the box
* Provide four types of initial test using different test frameworks:
* Catch2 test framework
* Traditional unit testing using Catch2
* Approval test using Catch2
* Google Test test framework
* Traditional unit testing using Google Test
* Approval test using Google Test
* The different types of initial test are located in separate folders
in the test folder.
* Remove scripts to build and run tests and replace
with instructions in the cpp README.md
* Use C++17
* Use CMake => 3.13
25 lines
362 B
C++
25 lines
362 B
C++
#include <string>
|
|
#include <vector>
|
|
|
|
using namespace std;
|
|
|
|
class Item
|
|
{
|
|
public:
|
|
string name;
|
|
int sellIn;
|
|
int quality;
|
|
Item(string name, int sellIn, int quality) : name(name), sellIn(sellIn), quality(quality)
|
|
{}
|
|
};
|
|
|
|
class GildedRose
|
|
{
|
|
public:
|
|
vector<Item> & items;
|
|
GildedRose(vector<Item> & items);
|
|
|
|
void updateQuality();
|
|
};
|
|
|