Candidate_v1.7.0
        stable
      
      
        
          | Last change
 on this file since 1ca493a was             765f16, checked in by Frederik Heber <heber@…>, 14 years ago | 
        
          | 
Huge Refactoring of FormatParserStorage and all FormatParser's.
 
FormatParser:
 
FormatParserStorage:
 We construct all lookup tables and alikes via boost preprocessor magic from
a list of all available parser (enums).
we use the templated getParser() and addParser() functions to serve parsers
to the outside. Instances are as usual created only once.
 
Tests:
 tests only had to be changed because of the "renaming" of the Parsers.
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            763 bytes | 
      
      
| Rev | Line |  | 
|---|
| [9e4fd1] | 1 | /* | 
|---|
|  | 2 | * ParserXyzUnitTest.hpp | 
|---|
|  | 3 | * | 
|---|
|  | 4 | *  Created on: Mar 3, 2010 | 
|---|
|  | 5 | *      Author: metzler | 
|---|
|  | 6 | */ | 
|---|
|  | 7 | #ifndef PARSERXYZUNITTEST_HPP_ | 
|---|
|  | 8 | #define PARSERXYZUNITTEST_HPP_ | 
|---|
|  | 9 |  | 
|---|
|  | 10 | // include config.h | 
|---|
|  | 11 | #ifdef HAVE_CONFIG_H | 
|---|
|  | 12 | #include <config.h> | 
|---|
|  | 13 | #endif | 
|---|
|  | 14 |  | 
|---|
| [765f16] | 15 | #include "Parser/XyzParser.hpp" | 
|---|
| [9e4fd1] | 16 |  | 
|---|
|  | 17 | #include <cppunit/extensions/HelperMacros.h> | 
|---|
|  | 18 | #include <string> | 
|---|
|  | 19 |  | 
|---|
|  | 20 | class ParserXyzUnitTest :  public CppUnit::TestFixture | 
|---|
|  | 21 | { | 
|---|
|  | 22 | CPPUNIT_TEST_SUITE( ParserXyzUnitTest ) ; | 
|---|
|  | 23 | CPPUNIT_TEST ( rewriteAnXyzTest ); | 
|---|
| [0180d6] | 24 | CPPUNIT_TEST ( readMultiXyzTest ); | 
|---|
|  | 25 | CPPUNIT_TEST ( writeMultiXyzTest ); | 
|---|
| [9e4fd1] | 26 | CPPUNIT_TEST_SUITE_END(); | 
|---|
|  | 27 |  | 
|---|
|  | 28 | public: | 
|---|
|  | 29 | void setUp(); | 
|---|
|  | 30 | void tearDown(); | 
|---|
|  | 31 |  | 
|---|
|  | 32 | void rewriteAnXyzTest(); | 
|---|
| [0180d6] | 33 | void readMultiXyzTest(); | 
|---|
|  | 34 | void writeMultiXyzTest(); | 
|---|
| [765f16] | 35 |  | 
|---|
|  | 36 | private: | 
|---|
|  | 37 | FormatParser<xyz> *parser; | 
|---|
| [9e4fd1] | 38 | }; | 
|---|
|  | 39 |  | 
|---|
|  | 40 | #endif /* PARSERXYZUNITTEST_HPP_ */ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.