From 95bc27cc65c521c478c8613cdc2047bcf66966db Mon Sep 17 00:00:00 2001 From: Mathieu Tillet <tillet@ill.eu> Date: Fri, 14 Feb 2020 16:53:18 +0100 Subject: [PATCH] Removed the appendDataSearchSubDir so as not to modify the environment --- Framework/DataHandling/test/LoadILLTest.h | 59 +++++++++-------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/Framework/DataHandling/test/LoadILLTest.h b/Framework/DataHandling/test/LoadILLTest.h index 99b4d7b6281..ba6bcc83bd0 100644 --- a/Framework/DataHandling/test/LoadILLTest.h +++ b/Framework/DataHandling/test/LoadILLTest.h @@ -26,19 +26,6 @@ public: static LoadILLTest *createSuite() { return new LoadILLTest(); } static void destroySuite(LoadILLTest *suite) { delete suite; } - void setUp() override { - std::string instrumentPaths[12] = { - "ILL/D11/", "ILL/D22/", "ILL/D33/", "ILL/D20/", - "ILL/D2B/", "ILL/IN4/", "ILL/IN5/", "ILL/IN6/", - "ILL/IN16B/", "ILL/PANTHER/", "ILL/D17/", "ILL/Figaro/"}; - - for (size_t i = 0; i < 12; i++) { - ConfigService::Instance().appendDataSearchSubDir(instrumentPaths[i]); - } - - ConfigService::Instance().setFacility("ILL"); - } - void tearDown() override { AnalysisDataService::Instance().clear(); } void checkLoader(std::string filename, std::string resultLoader) { @@ -49,57 +36,57 @@ public: TS_ASSERT_EQUALS(alg.getPropertyValue("LoaderName"), resultLoader) } - void test_LoadSANS_D11() { checkLoader("010560", "LoadILLSANS"); } + void test_LoadSANS_D11() { checkLoader("ILL/D11/010560", "LoadILLSANS"); } void test_LoadSANS_D33() { - checkLoader("002294", "LoadILLSANS"); - checkLoader("042610", "LoadILLSANS"); // D33 TOF + checkLoader("ILL/D33/002294", "LoadILLSANS"); + checkLoader("ILL/D33/042610", "LoadILLSANS"); // D33 TOF } - void test_LoadSANS_D22() { checkLoader("192068", "LoadILLSANS"); } + void test_LoadSANS_D22() { checkLoader("ILL/D22/192068", "LoadILLSANS"); } void test_LoadDiffraction_D2B() { - checkLoader("535401", "LoadILLDiffraction"); + checkLoader("ILL/D2B/535401", "LoadILLDiffraction"); } void test_LoadDiffraction_D20() { - checkLoader("967076", "LoadILLDiffraction"); - checkLoader("967087", "LoadILLDiffraction"); + checkLoader("ILL/D20/967076", "LoadILLDiffraction"); + checkLoader("ILL/D20/967087", "LoadILLDiffraction"); } void test_loadIndirect_IN16B() { - checkLoader("090661", "LoadILLIndirect"); // one wing qens - checkLoader("083072", "LoadILLIndirect"); // one wing efws - checkLoader("083073", "LoadILLIndirect"); // one wing ifws - checkLoader("136558", "LoadILLIndirect"); // two wings qens - checkLoader("143720", "LoadILLIndirect"); // two wings efws - checkLoader("170300", "LoadILLIndirect"); // two wings ifws - checkLoader("215962", "LoadILLIndirect"); // bats + checkLoader("ILL/IN16B/090661", "LoadILLIndirect"); // one wing qens + checkLoader("ILL/IN16B/083072", "LoadILLIndirect"); // one wing efws + checkLoader("ILL/IN16B/083073", "LoadILLIndirect"); // one wing ifws + checkLoader("ILL/IN16B/136558", "LoadILLIndirect"); // two wings qens + checkLoader("ILL/IN16B/143720", "LoadILLIndirect"); // two wings efws + checkLoader("ILL/IN16B/170300", "LoadILLIndirect"); // two wings ifws + checkLoader("ILL/IN16B/215962", "LoadILLIndirect"); // bats } - void test_loadTOF_IN4() { checkLoader("084446", "LoadILLTOF"); } + void test_loadTOF_IN4() { checkLoader("ILL/IN4/084446", "LoadILLTOF"); } void test_loadTOF_IN5() { - checkLoader("104007", "LoadILLTOF"); - checkLoader("189171", "LoadILLTOF"); + checkLoader("ILL/IN5/104007", "LoadILLTOF"); + checkLoader("ILL/IN5/189171", "LoadILLTOF"); } void test_loadTOF_IN6() { - checkLoader("164192", "LoadILLTOF"); - checkLoader("220010", "LoadILLTOF"); + checkLoader("ILL/IN6/164192", "LoadILLTOF"); + checkLoader("ILL/IN6/220010", "LoadILLTOF"); } void test_loadTOF_PANTHER() { - checkLoader("001036", "LoadILLTOF"); - checkLoader("001723", "LoadILLTOF"); + checkLoader("ILL/PANTHER/001036", "LoadILLTOF"); // monochromatic PANTHER + checkLoader("ILL/PANTHER/001723", "LoadILLTOF"); } void test_loadReflectometry_D17() { - checkLoader("317370", "LoadILLReflectometry"); + checkLoader("ILL/D17/317370", "LoadILLReflectometry"); } void test_loadReflectometry_FIGARO() { - checkLoader("000002", "LoadILLReflectometry"); + checkLoader("ILL/Figaro/000002", "LoadILLReflectometry"); } }; -- GitLab