Skip to content

Commit

Permalink
Format test files
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonChern committed Oct 16, 2023
1 parent ebb96e3 commit 1396539
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions src/tests/test_egfd_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ namespace {

auto current_path = test_data_dir / "graph_data";

std::unique_ptr<EGFDValidation> CreateEGFDValidationInstance(std::filesystem::path const& graph_path, const std::vector<std::string>& gfd_paths) {
StdParamsMap optionMap = {{config::names::kCsvPath, graph_path},{config::names::kGFDData, gfd_paths}};
std::unique_ptr<EGFDValidation> CreateEGFDValidationInstance(
std::filesystem::path const& graph_path, const std::vector<std::string>& gfd_paths) {
StdParamsMap optionMap = {{config::names::kCsvPath, graph_path},
{config::names::kGFDData, gfd_paths}};
return algos::CreateAndLoadAlgorithm<EGFDValidation>(optionMap);
}

TEST(EGFDValidationTest, TestTrivially) {
auto graph_path = current_path / "quadrangle.dot";
auto gfd_path = current_path / "quadrangle_gfd.dot";
std::vector<std::string> gfd_paths = { gfd_path };
std::vector<std::string> gfd_paths = {gfd_path};
auto algorithm = CreateEGFDValidationInstance(graph_path, gfd_paths);
int expected_size = 1;
algorithm->Execute();
Expand All @@ -32,12 +34,12 @@ TEST(EGFDValidationTest, TestTrivially) {
TEST(EGFDValidationTest, TestExistingMatches) {
auto graph_path = current_path / "directors.dot";
auto gfd_path = current_path / "directors_gfd.dot";
std::vector<std::string> gfd_paths = { gfd_path };
std::vector<std::string> gfd_paths = {gfd_path};
auto algorithm = CreateEGFDValidationInstance(graph_path, gfd_paths);
int expected_size = 0;
algorithm->Execute();
std::vector<GFD> GFDList = algorithm->GFDList();
ASSERT_EQ(expected_size, GFDList.size());
}

}
} // namespace
12 changes: 7 additions & 5 deletions src/tests/test_gfd_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ namespace {

auto current_path = test_data_dir / "graph_data";

std::unique_ptr<GFDValidation> CreateGFDValidationInstance(std::filesystem::path const& graph_path, const std::vector<std::string>& gfd_paths) {
StdParamsMap optionMap = {{config::names::kCsvPath, graph_path},{config::names::kGFDData, gfd_paths}};
std::unique_ptr<GFDValidation> CreateGFDValidationInstance(
std::filesystem::path const& graph_path, const std::vector<std::string>& gfd_paths) {
StdParamsMap optionMap = {{config::names::kCsvPath, graph_path},
{config::names::kGFDData, gfd_paths}};
return algos::CreateAndLoadAlgorithm<GFDValidation>(optionMap);
}

TEST(GFDValidationTest, TestTrivially) {
auto graph_path = current_path / "quadrangle.dot";
auto gfd_path = current_path / "quadrangle_gfd.dot";
std::vector<std::string> gfd_paths = { gfd_path };
std::vector<std::string> gfd_paths = {gfd_path};
auto algorithm = CreateGFDValidationInstance(graph_path, gfd_paths);
int expected_size = 1;
algorithm->Execute();
Expand All @@ -32,12 +34,12 @@ TEST(GFDValidationTest, TestTrivially) {
TEST(GFDValidationTest, TestExistingMatches) {
auto graph_path = current_path / "directors.dot";
auto gfd_path = current_path / "directors_gfd.dot";
std::vector<std::string> gfd_paths = { gfd_path };
std::vector<std::string> gfd_paths = {gfd_path};
auto algorithm = CreateGFDValidationInstance(graph_path, gfd_paths);
int expected_size = 0;
algorithm->Execute();
std::vector<GFD> GFDList = algorithm->GFDList();
ASSERT_EQ(expected_size, GFDList.size());
}

}
} // namespace

0 comments on commit 1396539

Please sign in to comment.