add testing

This commit is contained in:
Jarryd Beck 2016-08-25 08:49:56 +10:00
parent c51b8bbdee
commit 2d480c0228
6 changed files with 10495 additions and 0 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
*.swp
build*
CMakeCache.txt
Makefile

21
.travis.yml Normal file
View File

@ -0,0 +1,21 @@
sudo: required
language: cpp
matrix:
include:
- os: linux
env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5
addons:
apt:
packages:
- g++-5
sources: &sources
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
- os: linux
env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
addons:
apt:
packages:
- clang-3.8
sources: *sources
script: cmake . && make && make test

View File

@ -29,6 +29,8 @@ ENDIF()
cmake_minimum_required(VERSION 2.6)
project(cxxopts)
enable_testing()
set(VERSION "0.0.1")
option(CXXOPTS_BUILD_EXAMPLES "Set to ON to build examples" ON)
@ -49,3 +51,4 @@ if(CXXOPTS_USE_UNICODE_HELP)
endif()
add_subdirectory(src)
add_subdirectory(test)

3
test/CMakeLists.txt Normal file
View File

@ -0,0 +1,3 @@
add_executable(options_test options.cpp)
add_test(options options_test)

10460
test/catch.hpp Normal file

File diff suppressed because it is too large Load Diff

6
test/options.cpp Normal file
View File

@ -0,0 +1,6 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
TEST_CASE("Basic options", "[options]")
{
}