Commit bd9a60e6 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Add support for tests.

parent 0ad4f68d
......@@ -23,6 +23,9 @@ SET(PROJECT_VERSION 0.2)
SETUP_PROJECT()
# Search for Boost.
FIND_PACKAGE(Boost 1.34 COMPONENTS filesystem system)
SET(${PROJECT_NAME}_HEADERS
include/hpp/util/assertion.hh
include/hpp/util/debug.hh
......
Subproject commit 537bddfeb7b7bde759edb43596f82f9e488715c9
Subproject commit 81333921d36ba657f064850a1f25fd4d5333c7ff
......@@ -28,13 +28,6 @@ ADD_DEFINITIONS(-DBUILDING_HPP_UTIL)
# Define logging directory location.
ADD_DEFINITIONS(-DHPP_LOGGINGDIR="${CMAKE_INSTALL_PREFIX}/var/log")
# Default include directories.
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/../include
${CMAKE_CURRENT_SOURCE_DIR}/../include
)
# Compile hpp-util library.
ADD_LIBRARY(hpp-util
SHARED
......@@ -44,4 +37,8 @@ ADD_LIBRARY(hpp-util
timer.cc
version.cc
)
# Link against Boost libraries.
TARGET_LINK_LIBRARIES(hpp-util ${Boost_LIBRARIES})
INSTALL(TARGETS hpp-util DESTINATION lib)
# Copyright (C) 2010 Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST.
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# Define tests.
DEFINE_UNIT_TEST(simple-test hpp-util)
DEFINE_UNIT_TEST(assertion hpp-util)
DEFINE_UNIT_TEST(exception hpp-util)
../../tests/assertion.cc:75: i < 3 evaluates to false
../../tests/assertion.cc:39: a >= 0 evaluates to false
../../tests/assertion.cc:62: res == a + b evaluates to false
filename:0: put your message here
../../tests/exception.cc:39: this exception should be catched
../../tests/exception.cc:50: this exception should be catched
../../tests/exception.cc:61: this custom exception should be catched
Supports Markdown
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