Move core/Parser to format/KeePass2XmlReader and core/Writer to format/KeePass2XmlWriter.

This commit is contained in:
Felix Geyer
2010-08-31 14:39:35 +02:00
parent 3bf0564436
commit ee4c2c3dd4
9 changed files with 82 additions and 83 deletions

View File

@@ -66,8 +66,8 @@ endmacro (ADD_UNIT_TEST)
add_unit_test( testgroup TestGroup.cpp )
target_link_libraries( testgroup keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} )
add_unit_test( testparser TestParser.cpp )
target_link_libraries( testparser keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} )
add_unit_test( testkeepass2xmlreader TestKeePass2XmlReader.cpp )
target_link_libraries( testkeepass2xmlreader keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} )
add_unit_test( testgroupmodel TestGroupModel.cpp modeltest.cpp )
target_link_libraries( testgroupmodel keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} )

View File

@@ -19,7 +19,7 @@
#include "core/Database.h"
#include "core/Metadata.h"
#include "core/Parser.h"
#include "format/KeePass2XmlReader.h"
#include "config-keepassx-tests.h"
namespace QTest {
@@ -66,9 +66,9 @@ QDateTime TestParser::genDT(int year, int month, int day, int hour, int min, int
void TestParser::initTestCase()
{
m_db = new Database();
Parser* parser = new Parser(m_db);
KeePass2XmlReader* reader = new KeePass2XmlReader(m_db);
QString xmlFile = QString(KEEPASSX_TEST_DIR).append("/NewDatabase.xml");
QVERIFY(parser->parse(xmlFile));
QVERIFY(reader->parse(xmlFile));
}
void TestParser::testMetadata()