[Cppunit-cvs] cppunit2/include/opentest interfaces.h,NONE,1.1
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-06-24 19:43:30
|
Update of /cvsroot/cppunit/cppunit2/include/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16515/include/opentest Added Files: interfaces.h Log Message: TestRunner / TestDriver communication interface --- NEW FILE: interfaces.h --- #ifndef OPENTEST_INTERFACES_H_INCLUDED # define OPENTEST_INTERFACES_H_INCLUDED # include <opentest/forwards.h> # include <opentest/properties.h> # include <map> # include <vector> namespace OpenTest { class OPENTEST_API TestRunnerInterface { public: virtual ~TestRunnerInterface() {} virtual void getTestDescriptions() = 0; virtual void getTestPlans() = 0; virtual void runTests( const TestPlan &plan ) = 0; virtual void stopTests() = 0; }; class OPENTEST_API TestDriverInterface { public: virtual ~TestDriverInterface() {} virtual void setTestDescriptions( TestDescriptions &tests ) = 0; virtual void setDefaultTestPlan( const TestPlan &plan ) = 0; virtual void startTesting( TestId testPlan ) = 0; virtual void addResultLog( TestId testPlan, const ResultLog &log ) = 0; virtual void addResultAssertion( TestId testPlan, const ResultAssertion &assertion ) = 0; virtual void setResultInputActualOutput( TestId testPlan, const ResultInputOutput &output ) = 0; virtual void setTestResult( TestId testPlan, ResultStatus &status ) = 0; virtual void testPlanDone( TestPlanId id ) = 0; }; class OPENTEST_API TestDescriptionCommon { public: TestId id_; String name_; String description_; Properties descriptionSpecific_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API TestCaseDescription : public TestDescriptionCommon { public: String inputFormatName_; Properties inputFormat_; String outputFormatName_; Properties outputFormat_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API TestSuiteDescription : public TestDescriptionCommon { public: std::deque<TestId> children_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API TestDescriptions { public: std::deque<TestCaseDescription> testCases_; std::deque<TestSuiteDescription> testSuites_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API TestPlan : public TestCaseDescription { public: TestId testCase_; Properties input_; Properties expectedOutput_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API TestPlans { public: std::deque<TestPlan> testPlans_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API ResultLog { public: String log_; Properties logSpecific_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API ResultAssertion { public: String assertionType_; String assertionFormat_; String message_; Properties expectedSpecific_; Properties actualSpecific_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API ResultInputOutput { public: String inputFormat_; String outputFormat_; Properties input_; Properties expected_; Properties actual_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; class OPENTEST_API ResultStatus { public: String status_; String subStatus_; Properties statusSpecific_; Properties statistics_; Stream &serialize( Stream &stream ) const; Stream &unserialize( Stream &stream ); }; inline Stream &OPENTEST_API operator <<( Stream &stream, const TestDescriptionCommon &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, TestDescriptionCommon &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const TestCaseDescription &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, TestCaseDescription &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const TestSuiteDescription &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, TestSuiteDescription &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const TestDescriptions &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, TestDescriptions &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const TestPlan &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, TestPlan &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const TestPlans &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, TestPlans &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const ResultLog &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, ResultLog &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const ResultAssertion &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, ResultAssertion &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const ResultInputOutput &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, ResultInputOutput &v ) { return v.unserialize( stream ); } inline Stream &OPENTEST_API operator <<( Stream &stream, const ResultStatus &v ) { return v.serialize( stream ); } inline Stream &OPENTEST_API operator >>( Stream &stream, ResultStatus &v ) { return v.unserialize( stream ); } } // namespace OpenTest #endif // OPENTEST_INTERFACES_H_INCLUDED |