Commit ee7ff42a authored by math's avatar math
Browse files

Testing kick-off. In order to use testing please install CxxTest locally to...

Testing kick-off. In order to use testing please install CxxTest locally to your host, see IntegrateCxxTestInCMakeProject for a minimal example.
parent f0cb24b2
......@@ -5,10 +5,15 @@ PROJECT( BrainCognize )
FIND_PACKAGE( Qt4 REQUIRED )
FIND_PACKAGE( OpenGL REQUIRED )
FIND_PACKAGE( Boost REQUIRED )
FIND_PACKAGE( CxxTest )
# Package settings:
SET( CXXTEST_USE_PYTHON 1 )
# Includes:
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${OPENGL_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${CXXTEST_INCLUDE_DIR} )
# Libraries for linking:
SET( QT_LINK_LIBRARIES ${QT_QTCORE_LIBRARY}
......@@ -20,6 +25,9 @@ MARK_AS_ADVANCED( LIBRARY_OUTPUT_PATH )
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )
MARK_AS_ADVANCED( EXECUTABLE_OUTPUT_PATH )
# Activate CTest and "test" target
ENABLE_TESTING()
# Global compiler flags:
#-----------------------
# -Wno-long-long since on Ubuntu 8.10 it won't compile without it
......
......@@ -3,3 +3,7 @@ ADD_SUBDIRECTORY( qt4 )
FILE(GLOB GUI_SRC "*.cpp")
ADD_LIBRARY( gui SHARED ${GUI_SRC} )
# Unit tests
CXXTEST_ADD_TEST( unittest_BGUI BGUI_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/test/BGUI_test.h )
//---------------------------------------------------------------------------
//
// Project: BrainCognize
//
//---------------------------------------------------------------------------
#ifndef BGUI_TEST_H
#define BGUI_TEST_H
#include <cxxtest/TestSuite.h>
#include "../BGUI.h"
class BGUITest : public CxxTest::TestSuite
{
public:
// Since BGUI is abstrac no test are here to define
void testInstanziation( void )
{
TS_ASSERT( true );
}
};
#endif // BGUI_TEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment