- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/unittests/ParserPdbUnitTest.cpp
r3bdb6d r765f16 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include "Parser/PdbParser.hpp"27 26 #include "World.hpp" 28 27 #include "atom.hpp" 29 #include " Element/element.hpp"30 #include " Element/periodentafel.hpp"28 #include "element.hpp" 29 #include "periodentafel.hpp" 31 30 #include "CodePatterns/Log.hpp" 32 31 #include "Descriptors/AtomTypeDescriptor.hpp" 32 #include "Parser/ChangeTracker.hpp" 33 #include "Parser/PdbParser.hpp" 33 34 34 35 #ifdef HAVE_TESTRUNNER … … 63 64 World::getInstance(); 64 65 66 parser = new FormatParser<pdb>(); 67 65 68 setVerbosity(2); 66 69 … … 70 73 } 71 74 72 void ParserPdbUnitTest::tearDown() { 75 void ParserPdbUnitTest::tearDown() 76 { 77 delete parser; 73 78 ChangeTracker::purgeInstance(); 74 79 World::purgeInstance(); … … 80 85 stringstream input; 81 86 input << waterPdb; 82 PdbParser* testParser = new PdbParser(); 83 testParser->load(&input); 87 parser->load(&input); 84 88 input.clear(); 85 89 … … 88 92 stringstream output; 89 93 std::vector<atom *> atoms = World::getInstance().getAllAtoms(); 90 testParser->save(&output, atoms);94 parser->save(&output, atoms); 91 95 92 96 // std::cout << "Save PDB is:" << std::endl; … … 94 98 95 99 input << output.str(); 96 PdbParser* testParser2 = new PdbParser();97 testParser2->load(&input);100 FormatParser<pdb>* parser2 = new FormatParser<pdb>(); 101 parser2->load(&input); 98 102 99 103 CPPUNIT_ASSERT_EQUAL(12, World::getInstance().numAtoms()); 104 105 delete parser2; 100 106 }
Note:
See TracChangeset
for help on using the changeset viewer.