diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..89da1148e9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: cpp +compiler: + - gcc + +script: mkdir build && cd build && cmake .. && ctest -V + +os: + - linux + - osx diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a297b7ce0..5ab8522d38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,14 +3,15 @@ cmake_minimum_required(VERSION 2.8) project(matrix CXX) if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type" FORCE) + set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type" FORCE) message(STATUS "set build type to ${CMAKE_BUILD_TYPE}") endif() list(APPEND CMAKE_CXX_FLAGS + ${CMAKE_CXX_FLAGS} -Wall -Weffc++ - #-Werror + -Werror -Wfatal-errors ) diff --git a/test/quaternion.cpp b/test/quaternion.cpp index eaa76ff77a..afba53576d 100644 --- a/test/quaternion.cpp +++ b/test/quaternion.cpp @@ -1,12 +1,17 @@ #include "Quaternion.hpp" -#include -#include +#include +#include using namespace matrix; int main() { - Quatf p(1, 0, 0, 0); + Quatf p(1, 2, 3, 4); + assert(p(0) == 1); + assert(p(1) == 2); + assert(p(2) == 3); + assert(p(3) == 100); + Quatf q(0, 1, 0, 0); Quatf r = p*q; Dcmf dcm = Dcmf(p);