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