mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Changed to use Catch2 v3
This commit is contained in:
parent
13c490cd64
commit
f5af8e44dc
@ -19,8 +19,8 @@ endif()
|
||||
|
||||
add_subdirectory(example)
|
||||
add_subdirectory(lint)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
enable_testing()
|
||||
|
||||
install(FILES peglib.h DESTINATION include)
|
||||
|
@ -1,12 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(test)
|
||||
|
||||
include_directories(..)
|
||||
Include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.0.0-preview3
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_executable(test-main test-main.cc test1.cc test2.cc test3.cc)
|
||||
target_link_libraries(test-main ${add_link_deps})
|
||||
add_executable(test-main test1.cc test2.cc test3.cc)
|
||||
|
||||
target_include_directories(test-main PRIVATE ..)
|
||||
target_link_libraries(test-main PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
add_test(
|
||||
NAME TestMain
|
||||
|
13050
test/catch.hh
13050
test/catch.hh
File diff suppressed because it is too large
Load Diff
@ -1,2 +0,0 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch.hh"
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <peglib.h>
|
||||
|
||||
using namespace peg;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <peglib.h>
|
||||
#include <sstream>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <peglib.h>
|
||||
|
||||
using namespace peg;
|
||||
|
Loading…
Reference in New Issue
Block a user