Skip to content

Commit 6bec597

Browse files
committed
Improve unit test coverage
1 parent 4bf3049 commit 6bec597

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ jobs:
4545
- name: Capture coverage data
4646
run: |
4747
lcov --capture \
48-
--directory build/include \
48+
--directory build \
4949
--output-file coverage.info \
5050
--ignore-errors mismatch
51-
# Strip system headers and external deps
51+
# Strip system headers, external deps, Catch2, and test files
5252
lcov --remove coverage.info \
5353
'/usr/*' \
5454
'*/external/*' \
55+
'*/catch2/*' \
56+
'*/Catch2/*' \
57+
'*/tests/*' \
5558
--output-file coverage.info
5659
lcov --list coverage.info
5760

tests/test_csv_field.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ TEST_CASE("CSVField get<>() - Floating Point Value", "[test_csv_field_get_float]
148148
REQUIRE(euler.try_get(double_out));
149149
REQUIRE(double_out == Catch::Approx(2.718));
150150

151+
double long_double_out = 0;
152+
REQUIRE(euler.try_get(long_double_out));
153+
REQUIRE(double_out == Catch::Approx(2.718l));
154+
151155
int int_out = 0;
152156
REQUIRE_FALSE(euler.try_get(int_out));
153157
}

0 commit comments

Comments
 (0)