From acb78bca4be5bbc6a68ee6855f92a967932729e7 Mon Sep 17 00:00:00 2001 From: Tom Titcombe <t.j.titcombe@gmail.com> Date: Mon, 7 Jan 2019 12:37:38 +0000 Subject: [PATCH] Fit clang formatting Refs #0 --- .../inc/MantidDataHandling/ISISDataArchive.h | 5 ++-- .../DataHandling/test/ISISDataArchiveTest.h | 25 +++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h b/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h index f2058ebfad7..854369ae97b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h @@ -31,8 +31,9 @@ public: getArchivePath(const std::set<std::string> &filenames, const std::vector<std::string> &exts) const override; /// Public and virtual for testing purposes - virtual std::string getCorrectExtension(const std::string &path, - const std::vector<std::string> &exts) const; + virtual std::string + getCorrectExtension(const std::string &path, + const std::vector<std::string> &exts) const; private: /// Queries the archive & returns the path to a single file. diff --git a/Framework/DataHandling/test/ISISDataArchiveTest.h b/Framework/DataHandling/test/ISISDataArchiveTest.h index 579bdd0ae56..955b5104fd1 100644 --- a/Framework/DataHandling/test/ISISDataArchiveTest.h +++ b/Framework/DataHandling/test/ISISDataArchiveTest.h @@ -26,11 +26,12 @@ const char *URL_PREFIX = "http://data.isis.rl.ac.uk/where.py/unixdir?name="; class MockgetCorrectExtension : public ISISDataArchive { public: - std::string getCorrectExtension(const std::string &path, - const std::vector<std::string> &exts) const override { - (void)exts; - return path; - } + std::string + getCorrectExtension(const std::string &path, + const std::vector<std::string> &exts) const override { + (void)exts; + return path; + } }; class ISISDataArchiveTest : public CxxTest::TestSuite { @@ -51,7 +52,7 @@ public: if (path.empty()) { TS_FAIL("Returned path was empty."); } else { - TS_ASSERT_EQUALS(path.substr(path.size() - 18, 10), "cycle_98_0"); + TS_ASSERT_EQUALS(path.substr(path.size() - 18, 10), "cycle_98_0"); } } @@ -62,19 +63,23 @@ public: */ void xtestgetCorrectExtension() { std::string path; - if (strcmp(URL_PREFIX,"http://data.isis.rl.ac.uk/where.py/windir?name=")==0) { - path = "\\isis.cclrc.ac.uk\\inst$\\ndxhrpd\\instrument\\data\\cycle_98_0\\HRP00273"; + if (strcmp(URL_PREFIX, "http://data.isis.rl.ac.uk/where.py/windir?name=") == + 0) { + path = "\\isis.cclrc.ac.uk\\inst$\\ndxhrpd\\instrument\\data\\cycle_98_" + "0\\HRP00273"; } else { path = "/archive/ndxhrpd/Instrument/data/cycle_98_0/HRP00273"; } ISISDataArchive arch; const std::vector<std::string> correct_exts = {".RAW"}; - const std::string rawExtension = arch.getCorrectExtension(path, correct_exts); + const std::string rawExtension = + arch.getCorrectExtension(path, correct_exts); TS_ASSERT_EQUALS(rawExtension, path + ".RAW"); const std::vector<std::string> incorrect_exts = {".so", ".txt"}; - const std::string emptyString = arch.getCorrectExtension(path, incorrect_exts); + const std::string emptyString = + arch.getCorrectExtension(path, incorrect_exts); TS_ASSERT_EQUALS(emptyString, ""); } -- GitLab