Skip to content

Commit ec267f1

Browse files
committed
test(coverage): Add comprehensive unit tests to improve coverage
Added 28 new unit tests to increase code coverage from 79.11% to 80.68%, bringing it closer to the 82% target. Total test count increased from 130 to 158 tests. New test coverage: - #[cfg(test)] attribute detection on functions - File size limit enforcement and error paths - Directory analysis edge cases (no files, all too large) - Mixed file/directory analysis workflows - Output formatting (text/JSON) with both accumulator types - End-to-end integration workflows - Multi-file and subdirectory analysis - FileBackedAccumulator operations and iteration - Report serialization/deserialization - Args::parse_max_file_size error handling Remaining 1.32% gap to 82% consists of code that cannot be easily unit tested: - main() function (74 lines, requires integration tests) - Debug logging statements (require env var configuration) - Error handling for system failures (temp file I/O errors) - Progress bar terminal detection logic - println! macros (executed but not counted by tarpaulin) All tests pass (158/158) and clippy reports no warnings. $test
1 parent f3e36a0 commit ec267f1

File tree

1 file changed

+771
-0
lines changed

1 file changed

+771
-0
lines changed

0 commit comments

Comments
 (0)