From e28645b3a2b610c1c95ed8f7553e336354b7d17f Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 4 Jan 2018 11:48:41 +0000 Subject: Add fortunes favor to benchmark script --- src/test/flower_garden_test.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/test/flower_garden_test.cpp (limited to 'src/test/flower_garden_test.cpp') diff --git a/src/test/flower_garden_test.cpp b/src/test/flower_garden_test.cpp new file mode 100644 index 0000000..eab2e7e --- /dev/null +++ b/src/test/flower_garden_test.cpp @@ -0,0 +1,28 @@ +// +// Created by thecharlesblake on 10/4/17. +// + +#include + +#include "test_helper.h" + +typedef test_helper th; + +const static std::string path = "resources/fortunes_favor/"; +const static std::string type = "simple-fortunes-favor"; + +TEST(FortunesFavor, SimpleSolvable) { + EXPECT_TRUE(th::is_solvable(path + "SimpleSolvable.json", type)); +} + +TEST(FortunesFavor, ComplexSolvable) { + EXPECT_TRUE(th::is_solvable(path + "ComplexSolvable.json", type)); +} + +TEST(FortunesFavor, SimpleUnsolvable) { + EXPECT_FALSE(th::is_solvable(path + "SimpleUnsolvable.json", type)); +} + +TEST(FortunesFavor, ComplexUnsolvable) { + EXPECT_FALSE(th::is_solvable(path + "ComplexUnsolvable.json", type)); +} -- cgit v1.2.1 From 1a262ef15c0f00ec756aa40952a3281204636ad9 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 4 Jan 2018 15:45:23 +0000 Subject: Add unit tests for flower garden --- src/test/flower_garden_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/flower_garden_test.cpp') diff --git a/src/test/flower_garden_test.cpp b/src/test/flower_garden_test.cpp index eab2e7e..b1aee9e 100644 --- a/src/test/flower_garden_test.cpp +++ b/src/test/flower_garden_test.cpp @@ -8,21 +8,21 @@ typedef test_helper th; -const static std::string path = "resources/fortunes_favor/"; -const static std::string type = "simple-fortunes-favor"; +const static std::string path = "resources/flower_garden/"; +const static std::string type = "simple-flower-garden"; -TEST(FortunesFavor, SimpleSolvable) { +TEST(FlowerGarden, SimpleSolvable) { EXPECT_TRUE(th::is_solvable(path + "SimpleSolvable.json", type)); } -TEST(FortunesFavor, ComplexSolvable) { +TEST(FlowerGarden, ComplexSolvable) { EXPECT_TRUE(th::is_solvable(path + "ComplexSolvable.json", type)); } -TEST(FortunesFavor, SimpleUnsolvable) { +TEST(FlowerGarden, SimpleUnsolvable) { EXPECT_FALSE(th::is_solvable(path + "SimpleUnsolvable.json", type)); } -TEST(FortunesFavor, ComplexUnsolvable) { +TEST(FlowerGarden, ComplexUnsolvable) { EXPECT_FALSE(th::is_solvable(path + "ComplexUnsolvable.json", type)); } -- cgit v1.2.1