/
jiteman
/
jsd-foreign-libreoffice-cppunit
Обзор
Документация
Войти
/
jiteman
/
jsd-foreign-libreoffice-cppunit
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
examples/cppunittest/TestCallerTest.h
77 строк
2 KB
jiteman
initial commit has been done
14 апр 2024, 15:49
14 апр 2024, 15:49
4c53812
Код
Авторство
О чём код?
#ifndef TESTCALLERTEST_H #define TESTCALLERTEST_H #include <cppunit/extensions/HelperMacros.h> #include <cppunit/TestCase.h> #include <cppunit/TestResult.h> #include <cppunit/TestSuite.h> #include "MockTestListener.h" #include "TrackedTestCase.h" class TestCallerTest : public CPPUNIT_NS::TestFixture, Tracker { CPPUNIT_TEST_SUITE( TestCallerTest ); CPPUNIT_TEST( testBasicConstructor ); CPPUNIT_TEST( testReferenceConstructor ); CPPUNIT_TEST( testPointerConstructor ); // CPPUNIT_TEST( testExpectFailureException ); // CPPUNIT_TEST( testExpectException ); // CPPUNIT_TEST( testExpectedExceptionNotCaught ); CPPUNIT_TEST_SUITE_END(); public: TestCallerTest(); virtual ~TestCallerTest(); void setUp(); void tearDown(); void testBasicConstructor(); void testReferenceConstructor(); void testPointerConstructor(); // void testExpectFailureException(); // void testExpectException(); // void testExpectedExceptionNotCaught(); private: class ExceptionThrower : public CPPUNIT_NS::TestCase { public: void testThrowFailureException(); void testThrowException(); void testThrowNothing(); }; virtual void onConstructor(); virtual void onDestructor(); virtual void onSetUp(); virtual void onTearDown(); virtual void onTest(); void checkNothingButConstructorCalled(); void checkRunningSequenceCalled(); void checkTestName( std::string testName ); TestCallerTest( const TestCallerTest © ); void operator =( const TestCallerTest © ); private: int m_constructorCount; int m_destructorCount; int m_setUpCount; int m_tearDownCount; int m_testCount; const std::string m_testName; MockTestListener *m_testListener; CPPUNIT_NS::TestResult *m_result; }; // Inlines methods for TestCallerTest: // ----------------------------------- #endif // TESTCALLERTEST_H