diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-21 09:57:52 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-21 09:57:52 +0000 |
| commit | ca5f94534beb3fb395a397a2fe991f4c64fb2f84 (patch) | |
| tree | 1ab95c541266dc554500d201865f683616a11dbc /src/DllPlugInTester/CommandLineParserTest.h | |
| parent | aa3e46e802dc5139e3e2c32e6a00526697e8a0aa (diff) | |
| download | cppunit-ca5f94534beb3fb395a397a2fe991f4c64fb2f84.tar.gz | |
Src/DllPlugInTester/makefile.
src/DllPlugInTester/makefile.am: removed ld.so from LDADD flags.
* src/DllPlugInTester/CommandLineParser.h:
* src/DllPlugInTester/CommandLineParser.cpp: rewrote, fixed problem
with double quotes in command line...
* src/DllPlugInTester/CommandLineParserTest.h:
* src/DllPlugInTester/CommandLineParserTest.cpp:
* src/DllPlugInTester/DllPlugInTesterTest.cpp: added, unit tests for
CommandLineParser.
* src/msvc6/TestPlugIn/*: removed.
Diffstat (limited to 'src/DllPlugInTester/CommandLineParserTest.h')
| -rw-r--r-- | src/DllPlugInTester/CommandLineParserTest.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/DllPlugInTester/CommandLineParserTest.h b/src/DllPlugInTester/CommandLineParserTest.h new file mode 100644 index 0000000..3e31709 --- /dev/null +++ b/src/DllPlugInTester/CommandLineParserTest.h @@ -0,0 +1,61 @@ +#ifndef COMMANDLINEPARSERTEST_H +#define COMMANDLINEPARSERTEST_H + +#include <cppunit/extensions/HelperMacros.h> + + +class CommandLineParser; +class CommandLineParserException; + + +class CommandLineParserTest : public CppUnit::TestCase +{ + CPPUNIT_TEST_SUITE( CommandLineParserTest ); + CPPUNIT_TEST( testEmptyCommandLine ); + CPPUNIT_TEST( testFlagCompiler ); + CPPUNIT_TEST( testLongFlagBriefProgress ); + CPPUNIT_TEST( testFileName ); + CPPUNIT_TEST( testTestPath ); + CPPUNIT_TEST( testParameterWithSpace ); + CPPUNIT_TEST_EXCEPTION( testMissingStyleSheetParameterThrow, CommandLineParserException); + CPPUNIT_TEST_EXCEPTION( testMissingEncodingParameterThrow, CommandLineParserException); + CPPUNIT_TEST( testXmlFileNameIsOptional ); + CPPUNIT_TEST( testPlugInsWithParameters ); + CPPUNIT_TEST_SUITE_END(); + +public: + CommandLineParserTest(); + virtual ~CommandLineParserTest(); + + void setUp(); + void tearDown(); + + void testEmptyCommandLine(); + void testFlagCompiler(); + void testLongFlagBriefProgress(); + void testFileName(); + void testTestPath(); + void testParameterWithSpace(); + void testMissingStyleSheetParameterThrow(); + void testMissingEncodingParameterThrow(); + void testXmlFileNameIsOptional(); + void testPlugInsWithParameters(); + +private: + CommandLineParserTest( const CommandLineParserTest &other ); + void operator =( const CommandLineParserTest &other ); + + void parse( char **lines ); + +private: + CommandLineParser *_parser; +}; + + + +// Inlines methods for CommandLineParserTest: +// ------------------------------------------ + + + +#endif // COMMANDLINEPARSERTEST_H |
