mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Merge pull request #207 from Fraser999/list_tests_issue
List tests issue
This commit is contained in:
commit
0712bbb251
@ -86,12 +86,13 @@ namespace Catch {
|
||||
std::cout << nameCol;
|
||||
}
|
||||
if( i < tagsWrapper.size() && !tagsWrapper[i].empty() ) {
|
||||
size_t padLen( maxNameLen > nameCol.size() ? maxNameLen - nameCol.size() : 0 );
|
||||
if( i == 0 ) {
|
||||
Colour colourGuard( Colour::SecondaryText );
|
||||
std::cout << " " << std::string( maxNameLen - nameCol.size(), '.' ) << " ";
|
||||
std::cout << " " << std::string( padLen, '.' ) << " ";
|
||||
}
|
||||
else {
|
||||
std::cout << std::string( maxNameLen - nameCol.size(), ' ' ) << " ";
|
||||
std::cout << std::string( padLen, ' ' ) << " ";
|
||||
}
|
||||
std::cout << tagsWrapper[i];
|
||||
}
|
||||
|
@ -1,16 +1,14 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(Catch C CXX)
|
||||
message("configure: Catch/SelfTest")
|
||||
project(Catch)
|
||||
|
||||
# define some folders
|
||||
set(CATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
|
||||
get_filename_component(CATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
|
||||
get_filename_component(CATCH_DIR "${CATCH_DIR}" PATH)
|
||||
set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest)
|
||||
set(SCRIPTS_DIR ${CATCH_DIR}/scripts)
|
||||
|
||||
# define the sources of the self test
|
||||
set(
|
||||
SOURCES
|
||||
set(SOURCES
|
||||
${SELF_TEST_DIR}/ApproxTests.cpp
|
||||
${SELF_TEST_DIR}/BDDTests.cpp
|
||||
${SELF_TEST_DIR}/catch_self_test.cpp
|
||||
@ -31,7 +29,12 @@ set(
|
||||
include_directories(${CATCH_DIR}/include)
|
||||
add_executable(SelfTest ${SOURCES})
|
||||
|
||||
# configure unit tests via ctest
|
||||
# configure unit tests via CTest
|
||||
enable_testing()
|
||||
add_test(NAME SelfTest_run COMMAND SelfTest)
|
||||
#add_test(NAME SelfTest_run COMMAND python ${SCRIPTS_DIR}/approvalTests.py "${CMAKE_CURRENT_BINARY_DIR}/SelfTest")
|
||||
add_test(NAME RunTests COMMAND SelfTest)
|
||||
|
||||
add_test(NAME ListTests COMMAND SelfTest --list-tests)
|
||||
set_tests_properties(ListTests PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ test cases")
|
||||
|
||||
add_test(NAME ListTags COMMAND SelfTest --list-tags)
|
||||
set_tests_properties(ListTags PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ tags")
|
||||
|
Loading…
Reference in New Issue
Block a user