mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 13:05:20 +01:00
Update extraction tests, update coverage-ci, update ssp.hpp
This commit is contained in:
parent
848689451c
commit
32cbfe1d17
3
.github/workflows/coverage.yml
vendored
3
.github/workflows/coverage.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
|||||||
apt install -y gcovr lcov
|
apt install -y gcovr lcov
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug
|
run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-Wall -fprofile-arcs -ftest-coverage --coverage"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -j ${{steps.cores.outputs.count}}
|
run: cmake --build build -j ${{steps.cores.outputs.count}}
|
||||||
@ -62,7 +62,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
lcov -d . -c -o out.info --rc lcov_branch_coverage=1 --no-external
|
lcov -d . -c -o out.info --rc lcov_branch_coverage=1 --no-external
|
||||||
lcov -e out.info '*include/ss*hpp' -o filtered.info
|
lcov -e out.info '*include/ss*hpp' -o filtered.info
|
||||||
genhtml --t "SSP Coverage" --legend --demangle-cpp -o html -s --branch-coverage -p $PWD filtered.info
|
|
||||||
|
|
||||||
- name: Invoke coveralls
|
- name: Invoke coveralls
|
||||||
uses: coverallsapp/github-action@v2
|
uses: coverallsapp/github-action@v2
|
||||||
|
1
ssp.hpp
1
ssp.hpp
@ -2017,7 +2017,6 @@ private:
|
|||||||
return extract_tuple<Ts...>(elems);
|
return extract_tuple<Ts...>(elems);
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not know how to specialize by return type :(
|
|
||||||
template <typename... Ts>
|
template <typename... Ts>
|
||||||
no_void_validator_tup_t<std::tuple<Ts...>> convert_impl(
|
no_void_validator_tup_t<std::tuple<Ts...>> convert_impl(
|
||||||
const split_data& elems, const std::tuple<Ts...>*) {
|
const split_data& elems, const std::tuple<Ts...>*) {
|
||||||
|
@ -12,8 +12,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|||||||
target_compile_options(ssp INTERFACE -Wall -Wextra)
|
target_compile_options(ssp INTERFACE -Wall -Wextra)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -fprofile-arcs -ftest-coverage --coverage")
|
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_compile_options(/bigobj)
|
add_compile_options(/bigobj)
|
||||||
elseif (MINGW)
|
elseif (MINGW)
|
||||||
|
@ -64,8 +64,8 @@ TEST_CASE("extract test functions for numbers with invalid inputs") {
|
|||||||
CHECK_INVALID_CONVERSION("xxx1", float);
|
CHECK_INVALID_CONVERSION("xxx1", float);
|
||||||
|
|
||||||
// number too big
|
// number too big
|
||||||
CHECK_INVALID_CONVERSION((std::string{20, '1'} + "." +
|
CHECK_INVALID_CONVERSION((std::string{40, '1'} + "." +
|
||||||
std::string{20, '2'}),
|
std::string{40, '2'}),
|
||||||
double);
|
double);
|
||||||
|
|
||||||
// random input for int
|
// random input for int
|
||||||
|
@ -31,8 +31,8 @@ TEST_CASE("extract test functions for numbers with invalid inputs without fast "
|
|||||||
CHECK_INVALID_CONVERSION("xxx1", float);
|
CHECK_INVALID_CONVERSION("xxx1", float);
|
||||||
|
|
||||||
// number too big
|
// number too big
|
||||||
CHECK_INVALID_CONVERSION((std::string{20, '1'} + "." +
|
CHECK_INVALID_CONVERSION((std::string{40, '1'} + "." +
|
||||||
std::string{20, '2'}),
|
std::string{40, '2'}),
|
||||||
double);
|
double);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user