From eb90aef4efe0d968fa0ce2f2c023cb93708c78d6 Mon Sep 17 00:00:00 2001 From: Maik Nijhuis <maik.nijhuis@triopsys.nl> Date: Mon, 21 Dec 2020 14:52:13 +0100 Subject: [PATCH] Format faceting files. --- include/schaapcommon/facets/ds9facetfile.h | 5 +++-- src/facets/test/tds9facetfile.cc | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/schaapcommon/facets/ds9facetfile.h b/include/schaapcommon/facets/ds9facetfile.h index 207e6e4..006ac62 100644 --- a/include/schaapcommon/facets/ds9facetfile.h +++ b/include/schaapcommon/facets/ds9facetfile.h @@ -88,7 +88,8 @@ class DS9FacetFile { /** * Take a comment as input e.g. text={direction} and retrieves direction. */ - static std::string ParseDirection(TokenType type, const std::string& comment) { + static std::string ParseDirection(TokenType type, + const std::string& comment) { const std::string classifier = "text="; std::string dir = ""; @@ -105,7 +106,7 @@ class DS9FacetFile { return dir; } -private: + private: std::vector<double> ReadNumList() { std::vector<double> vals; if (Token() != "(") diff --git a/src/facets/test/tds9facetfile.cc b/src/facets/test/tds9facetfile.cc index e69c701..c78c4d0 100644 --- a/src/facets/test/tds9facetfile.cc +++ b/src/facets/test/tds9facetfile.cc @@ -13,22 +13,22 @@ using schaapcommon::facets::Facet; BOOST_AUTO_TEST_SUITE(tds9facetfile) BOOST_AUTO_TEST_CASE(direction_comment) { - std::string dir = DS9FacetFile::ParseDirection(DS9FacetFile::TokenType::kComment, - "text=CygA, color=green"); + std::string dir = DS9FacetFile::ParseDirection( + DS9FacetFile::TokenType::kComment, "text=CygA, color=green"); BOOST_CHECK_EQUAL(dir, "CygA"); } BOOST_AUTO_TEST_CASE(direction_comment_reversed) { - std::string dir = DS9FacetFile::ParseDirection(DS9FacetFile::TokenType::kComment, - "color=green, text=CygA"); + std::string dir = DS9FacetFile::ParseDirection( + DS9FacetFile::TokenType::kComment, "color=green, text=CygA"); BOOST_CHECK_EQUAL(dir, "CygA"); } BOOST_AUTO_TEST_CASE(direction_empty) { - std::string dir = - DS9FacetFile::ParseDirection(DS9FacetFile::TokenType::kComment, "some other comment"); + std::string dir = DS9FacetFile::ParseDirection( + DS9FacetFile::TokenType::kComment, "some other comment"); BOOST_CHECK(dir.empty()); } -- GitLab