Ignore:
Timestamp:
Mar 30, 2010, 1:22:20 PM (15 years ago)
Author:
Saskia Metzler <metzler@…>
Children:
0f7883
Parents:
fd9d77
Message:

WIP tremolo parser

Location:
molecuilder/src/unittests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/unittests/Makefile.am

    rfd9d77 r2704e2  
    5555  bondgraphunittest.cpp \
    5656  CacheableTest.cpp \
    57   DescriptorUnittest.cpp \
    5857  gslmatrixsymmetricunittest.cpp \
    5958  gslmatrixunittest.cpp \
  • molecuilder/src/unittests/ParserUnitTest.cpp

    rfd9d77 r2704e2  
    1313
    1414#include "Parser/XyzParser.hpp"
     15#include "Parser/TremoloParser.hpp"
    1516#include "World.hpp"
    1617#include "element.hpp"
     
    4546
    4647void ParserUnitTest::rewriteAnXyzTest() {
     48  cout << "Testing the XYZ parser." << endl;
    4749  XyzParser* testParser = new XyzParser();
    4850  string waterXyz = "3\nH2O: water molecule\nO\t0.000000\t0.000000\t0.000000\nH\t0.758602\t0.000000\t0.504284\nH\t0.758602\t0.000000\t-0.504284\n";
     
    6163}
    6264
     65void ParserUnitTest::rewriteTremoloTest() {
     66  cout << "Testing the tremolo parser." << endl;
     67  TremoloParser* testParser = new TremoloParser();
     68  string waterTremolo = "#\n# ATOMDATA Id name Type x=3\n\n\n";
     69  stringstream input;
     70  input << waterTremolo;
     71  testParser->load(&input);
     72  waterTremolo = "#\n#ATOMDATA Id name Type x=3\n1 H hydrogen 3.0 4.5 0.1\n\n";
     73  input.clear();
     74  input << waterTremolo;
     75  testParser->load(&input);
     76  cout << "testing the tremolo parser is done" << endl;
     77}
  • molecuilder/src/unittests/ParserUnitTest.hpp

    rfd9d77 r2704e2  
    1515  CPPUNIT_TEST_SUITE( ParserUnitTest ) ;
    1616  CPPUNIT_TEST ( rewriteAnXyzTest );
     17  CPPUNIT_TEST ( rewriteTremoloTest );
    1718  CPPUNIT_TEST_SUITE_END();
    1819
     
    2223
    2324  void rewriteAnXyzTest();
     25  void rewriteTremoloTest();
    2426};
    2527
Note: See TracChangeset for help on using the changeset viewer.