Salome HOME
correct selection mode activation
[modules/hydro.git] / src / HYDRO_tests / TestLib_Runner.h
1
2 /**
3   @file
4   \brief Declaration of the custom runner allowing start a subset of tests
5 */
6
7 #pragma once
8
9 #include <cppunit/TestRunner.h>
10 #include <list>
11
12 #ifdef WIN32
13   #pragma warning( disable: 4251 )
14   #pragma warning( disable: 4275 )
15 #endif
16
17 /**
18   \class TestLib_Runner
19   \brief Implementation of the custom runner allowing start a subset of tests
20 */
21 class TestLib_Runner : public CPPUNIT_NS::TestRunner
22 {
23 public:
24   void Add( const std::string& theSubstr );
25   bool Load( const std::string& theConfigFile );
26   void Run( CPPUNIT_NS::TestResult& theController );
27
28 protected:
29   void GetTests( CPPUNIT_NS::Test* theRoot, std::list<std::string>& theAllowedTests ) const;
30   bool IsAllowed( const std::string& theTestName ) const;
31
32 private:
33   std::list<std::string> mySubStrings; ///< the list of substring patterns 
34 };
35
36 #ifdef WIN32
37   #pragma warning( default: 4251 )
38   #pragma warning( default: 4275 )
39 #endif
40