From 69c62296414d4f1017dab69f0b94700a93b15b0d Mon Sep 17 00:00:00 2001 From: Owen Arnold <owen.arnold@stfc.ac.uk> Date: Wed, 25 Jul 2012 08:36:15 +0100 Subject: [PATCH] refs #5643 Catagories fixed and tested. --- .../Framework/Algorithms/src/NormaliseByDetector.cpp | 2 +- .../Algorithms/test/NormaliseByDetectorTest.h | 11 +++++++++++ .../MDEvents/src/ConvertToReflectometryQ.cpp | 2 +- .../MDEvents/src/CreateMDHistoWorkspace.cpp | 2 +- .../MDEvents/src/ImportMDEventWorkspace.cpp | 2 +- .../MDEvents/src/ImportMDHistoWorkspace.cpp | 2 +- .../MDEvents/test/ConvertToReflectometryQTest.h | 12 ++++++++++++ .../MDEvents/test/CreateMDHistoWorkspaceTest.h | 11 +++++++++++ .../MDEvents/test/ImportMDEventWorkspaceTest.h | 11 +++++++++++ .../MDEvents/test/ImportMDHistoWorkspaceTest.h | 12 ++++++++++++ 10 files changed, 62 insertions(+), 5 deletions(-) diff --git a/Code/Mantid/Framework/Algorithms/src/NormaliseByDetector.cpp b/Code/Mantid/Framework/Algorithms/src/NormaliseByDetector.cpp index e32148027a3..83277e0584a 100644 --- a/Code/Mantid/Framework/Algorithms/src/NormaliseByDetector.cpp +++ b/Code/Mantid/Framework/Algorithms/src/NormaliseByDetector.cpp @@ -151,7 +151,7 @@ namespace Mantid int NormaliseByDetector::version() const { return 1;}; /// Algorithm's category for identification. @see Algorithm::category - const std::string NormaliseByDetector::category() const { return "General";} + const std::string NormaliseByDetector::category() const { return "CorrectionFunctions\\NormalisationCorrections";} //---------------------------------------------------------------------------------------------- /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/Algorithms/test/NormaliseByDetectorTest.h b/Code/Mantid/Framework/Algorithms/test/NormaliseByDetectorTest.h index 68799005080..2ef403b14fe 100644 --- a/Code/Mantid/Framework/Algorithms/test/NormaliseByDetectorTest.h +++ b/Code/Mantid/Framework/Algorithms/test/NormaliseByDetectorTest.h @@ -301,6 +301,17 @@ public: static NormaliseByDetectorTest *createSuite() { return new NormaliseByDetectorTest(); } static void destroySuite( NormaliseByDetectorTest *suite ) { delete suite; } + void test_catagory() + { + NormaliseByDetector alg; + TS_ASSERT_EQUALS("CorrectionFunctions\\NormalisationCorrections", alg.category()); + } + + void test_name() + { + NormaliseByDetector alg; + TS_ASSERT_EQUALS("NormaliseByDetector", alg.name()); + } void test_Init() { diff --git a/Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp b/Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp index 205d93cab35..5b6523eadb5 100644 --- a/Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp +++ b/Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp @@ -191,7 +191,7 @@ namespace MDEvents int ConvertToReflectometryQ::version() const { return 1;}; /// Algorithm's category for identification. @see Algorithm::category - const std::string ConvertToReflectometryQ::category() const { return "General";} + const std::string ConvertToReflectometryQ::category() const { return "Reflectometry";} //---------------------------------------------------------------------------------------------- /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/MDEvents/src/CreateMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDEvents/src/CreateMDHistoWorkspace.cpp index bac7d238496..e9cae4bc0c4 100644 --- a/Code/Mantid/Framework/MDEvents/src/CreateMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDEvents/src/CreateMDHistoWorkspace.cpp @@ -83,7 +83,7 @@ namespace MDEvents int CreateMDHistoWorkspace::version() const { return 1;}; /// Algorithm's category for identification. @see Algorithm::category - const std::string CreateMDHistoWorkspace::category() const { return "General";} + const std::string CreateMDHistoWorkspace::category() const { return "MDAlgorithms";} //---------------------------------------------------------------------------------------------- /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp b/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp index 226b0585201..84434510a93 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp +++ b/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp @@ -191,7 +191,7 @@ namespace MDEvents int ImportMDEventWorkspace::version() const { return 1;}; /// Algorithm's category for identification. @see Algorithm::category - const std::string ImportMDEventWorkspace::category() const { return "General";} + const std::string ImportMDEventWorkspace::category() const { return "MDAlgorithms";} //---------------------------------------------------------------------------------------------- /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp index c3c07692de5..834c3b8ecef 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp @@ -89,7 +89,7 @@ namespace MDEvents int ImportMDHistoWorkspace::version() const { return 1;}; /// Algorithm's category for identification. @see Algorithm::category - const std::string ImportMDHistoWorkspace::category() const { return "General";} + const std::string ImportMDHistoWorkspace::category() const { return "MDAlgorithms";} //---------------------------------------------------------------------------------------------- /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h b/Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h index bdb56c2d3da..f9de83603f5 100644 --- a/Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h +++ b/Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h @@ -62,6 +62,18 @@ public: Mantid::API::FrameworkManager::Instance(); } + void test_catagory() + { + ConvertToReflectometryQ alg; + TS_ASSERT_EQUALS("Reflectometry", alg.category()); + } + + void test_name() + { + ConvertToReflectometryQ alg; + TS_ASSERT_EQUALS("ConvertToReflectometryQ", alg.name()); + } + void test_Init() { ConvertToReflectometryQ alg; diff --git a/Code/Mantid/Framework/MDEvents/test/CreateMDHistoWorkspaceTest.h b/Code/Mantid/Framework/MDEvents/test/CreateMDHistoWorkspaceTest.h index 453ad846fba..1fa76eecd51 100644 --- a/Code/Mantid/Framework/MDEvents/test/CreateMDHistoWorkspaceTest.h +++ b/Code/Mantid/Framework/MDEvents/test/CreateMDHistoWorkspaceTest.h @@ -43,6 +43,17 @@ public: static CreateMDHistoWorkspaceTest *createSuite() { return new CreateMDHistoWorkspaceTest(); } static void destroySuite( CreateMDHistoWorkspaceTest *suite ) { delete suite; } + void test_catagory() + { + CreateMDHistoWorkspace alg; + TS_ASSERT_EQUALS("MDAlgorithms", alg.category()); + } + + void test_name() + { + CreateMDHistoWorkspace alg; + TS_ASSERT_EQUALS("CreateMDHistoWorkspace", alg.name()); + } void test_Init() { diff --git a/Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h b/Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h index a44b47c7867..0a8e6ac037d 100644 --- a/Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h +++ b/Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h @@ -133,6 +133,17 @@ public: static ImportMDEventWorkspaceTest *createSuite() { return new ImportMDEventWorkspaceTest(); } static void destroySuite( ImportMDEventWorkspaceTest *suite ) { delete suite; } + void test_catagory() + { + ImportMDEventWorkspace alg; + TS_ASSERT_EQUALS("MDAlgorithms", alg.category()); + } + + void test_name() + { + ImportMDEventWorkspace alg; + TS_ASSERT_EQUALS("ImportMDEventWorkspace", alg.name()); + } void test_Init() { diff --git a/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h b/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h index 030c22cdbff..5bde63c48e5 100644 --- a/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h +++ b/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h @@ -89,6 +89,18 @@ public: static ImportMDHistoWorkspaceTest *createSuite() { return new ImportMDHistoWorkspaceTest(); } static void destroySuite( ImportMDHistoWorkspaceTest *suite ) { delete suite; } + void test_catagory() + { + ImportMDHistoWorkspace alg; + TS_ASSERT_EQUALS("MDAlgorithms", alg.category()); + } + + void test_name() + { + ImportMDHistoWorkspace alg; + TS_ASSERT_EQUALS("ImportMDHistoWorkspace", alg.name()); + } + void test_Init() { ImportMDHistoWorkspace alg; -- GitLab