Add cov-mark coverage for type-checker error dedup#110
Add cov-mark coverage for type-checker error dedup#110kaankacar wants to merge 2 commits intoInferara:mainfrom
Conversation
|
Fixes #51 |
There was a problem hiding this comment.
Pull request overview
This PR adds test coverage instrumentation using the cov-mark library to verify that the type-checker's error deduplication logic is properly exercised. The changes ensure both the "first occurrence" and "duplicate skipped" code paths are tested.
Changes:
- Added
cov-markas a workspace dependency and included it in the type-checker and tests packages - Instrumented the error deduplication logic with coverage marks for both first occurrence and duplicate detection
- Simplified the deduplication test case and added assertions to verify both code paths are exercised
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Added cov-mark 2.2.0 as a workspace dependency |
| core/type-checker/Cargo.toml | Added cov-mark dependency to type-checker package |
| core/type-checker/src/type_checker.rs | Instrumented error deduplication branches with cov_mark::hit! calls |
| tests/Cargo.toml | Added cov-mark dependency to tests package |
| tests/src/type_checker/error_recovery.rs | Added cov_mark::check! assertions and simplified test case |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cov_mark::check!(type_checker_error_dedup_skips_duplicate); | ||
| let result = try_type_check(source); |
There was a problem hiding this comment.
The cov_mark::check! call is placed before the code that should trigger the coverage mark. This will verify the mark was hit in a previous test run rather than during this specific test execution. Move the check after try_type_check(source) to properly verify the mark is hit during this test.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Kaan Kacar <kaankacar02@gmail.com>
|
Hello, any update on this @0xGeorgii ? |
Added cov-mark coverage for type-checker error dedup
TypeChecker::push_error_dedup.cov_mark::check!.