mirror of git://sigrok.org/pulseview
Added empty unit testing framework
This commit is contained in:
parent
a429590b40
commit
f0fa92c6c4
|
@ -1,10 +1,13 @@
|
|||
sigrok-qt2
|
||||
sigrok-qt2-test
|
||||
|
||||
# CMake cruft
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
CTestTestfile.cmake
|
||||
Makefile
|
||||
Testing/
|
||||
|
||||
# qt generated code
|
||||
*.qrc.depends
|
||||
|
|
|
@ -10,7 +10,7 @@ pkg_check_modules(PKGDEPS REQUIRED
|
|||
)
|
||||
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(Boost 1.46 REQUIRED)
|
||||
find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED)
|
||||
|
||||
set(VERSION 0.1.0)
|
||||
|
||||
|
@ -45,6 +45,10 @@ set(sigrok-qt2_RESOURCES
|
|||
sigrok-qt2.qrc
|
||||
)
|
||||
|
||||
set(sigrok-qt2_TEST_SOURCES
|
||||
test/test.cpp
|
||||
)
|
||||
|
||||
set(QT_USE_QTOPENGL TRUE)
|
||||
|
||||
qt4_wrap_cpp(sigrok-qt2_HEADERS_MOC ${sigrok-qt2_HEADERS})
|
||||
|
@ -79,3 +83,16 @@ target_link_libraries(sigrok-qt2
|
|||
${PKGDEPS_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
add_definitions(-DBOOST_TEST_DYN_LINK)
|
||||
|
||||
add_executable(sigrok-qt2-test
|
||||
${sigrok-qt2_TEST_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(sigrok-qt2-test
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
add_test(test ${CMAKE_CURRENT_BINARY_DIR}/sigrok-qt2-test)
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* This file is part of the sigrok project.
|
||||
*
|
||||
* Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
Loading…
Reference in New Issue