Skip to content

Commit

Permalink
tests: remove DBBrowserDB usage from test-import
Browse files Browse the repository at this point in the history
Apparently DBBrowserDB is not really used, so remove it and cleanup
test-import from the extra sources and dependencies needed by that.
  • Loading branch information
pinotree committed May 3, 2015
1 parent 27df9cf commit 8d07f12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
36 changes: 3 additions & 33 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,55 +65,25 @@ add_test(test-sqlobjects test-sqlobjects)
# test-import

set(TESTIMPORT_SRC
../sqlitedb.cpp
../sqlitetablemodel.cpp
../sqlitetypes.cpp
../csvparser.cpp
../grammar/Sqlite3Lexer.cpp
../grammar/Sqlite3Parser.cpp
../PreferencesDialog.cpp
TestImport.cpp
../FileDialog.cpp
)

set(TESTIMPORT_HDR
../grammar/sqlite3TokenTypes.hpp
../grammar/Sqlite3Lexer.hpp
../grammar/Sqlite3Parser.hpp
../csvparser.h
../sqlitetypes.h)

set(TESTIMPORT_FORMS
../PreferencesDialog.ui)

set(TESTIMPORT_MOC_HDR
../sqlitedb.h
../sqlitetablemodel.h
../PreferencesDialog.h
TestImport.h
../FileDialog.h
)

if(sqlcipher)
list(APPEND TESTIMPORT_SRC ../CipherDialog.cpp)
list(APPEND TESTIMPORT_FORMS ../CipherDialog.ui)
list(APPEND TESTIMPORT_MOC_HDR ../CipherDialog.h)
endif()

if(USE_QT5)
QT5_WRAP_UI(TESTIMPORT_FORM_HDR ${TESTIMPORT_FORMS})
else()
QT4_WRAP_CPP(TESTIMPORT_MOC ${TESTIMPORT_MOC_HDR})
QT4_WRAP_UI(TESTIMPORT_FORM_HDR ${TESTIMPORT_FORMS})
endif()

add_executable(test-import ${TESTIMPORT_MOC} ${TESTIMPORT_HDR} ${TESTIMPORT_SRC} ${TESTIMPORT_FORM_HDR})
add_executable(test-import ${TESTIMPORT_MOC} ${TESTIMPORT_SRC})

if(USE_QT5)
qt5_use_modules(test-import Test Widgets Gui)
qt5_use_modules(test-import Test Core)
set(QT_LIBRARIES "")
endif()

add_dependencies(test-import antlr)
target_link_libraries(test-import antlr ${QT_LIBRARIES} ${LIBSQLITE})
target_link_libraries(test-import ${QT_LIBRARIES})
add_test(test-import test-import)
4 changes: 0 additions & 4 deletions src/tests/TestImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "csvparser.h"
#include "TestImport.h"
#include "../sqlitedb.h"

QTEST_MAIN(TestImport)

Expand Down Expand Up @@ -41,9 +40,6 @@ void TestImport::csvImport()
}
file.flush();

// Call decodeCSV function
DBBrowserDB db;

CSVParser csvparser(true, separator, quote);
file.seek(0);
QTextStream tstream(&file);
Expand Down

0 comments on commit 8d07f12

Please sign in to comment.