feat: Add 58 new unit tests for TSS, TTS, rules, overlap, output, and parsers#9
Merged
TianYuan-Liu merged 2 commits intomasterfrom Jan 30, 2026
Conversation
… parsers Expand test coverage from 168 to 226 unit tests across multiple modules: - TSS extended tests (10): spanning all zones, exact boundaries for both strands, very small regions, zero TSS/promoter distances, and percentage calculation accuracy - TTS extended tests (8): entirely within zone, spanning TTS/downstream, negative strand downstream, exact boundaries, very large zones, and percentage accuracy for both strands - Rules extended tests (9): empty candidates, threshold failures with fallback, pctg_area filtering, multiple independent groups, three-candidate merging, no rules match fallback, and exact threshold boundaries - Overlap extended tests (9): find_search_start_index edge cases, region completely within exon, spanning multiple exons, single exon genes, beyond distance threshold, transcript/gene level processing, and negative strand first exon handling - Output extended tests (6): metadata with newlines/whitespace, special characters, exact header output verification, negative coordinates, merged transcripts format, and all strands handling - Parser BED extended tests (5): whitespace handling, very long lines, mixed valid/invalid lines, tab-only lines, and coordinate ordering - Parser GTF extended tests (7): overlapping genes, malformed attributes, CDS/UTR entries, quoted values with spaces, no exon entries, different sources, and max length tracking across chromosomes - Config comprehensive tests (6): whitespace in rules, all area combinations, extreme values, percentage ranges, report level default, and distance overflow prevention
Run cargo fmt to fix formatting issues that were causing CI to fail. The changes include proper line breaks in assert! macros, Candidate::new() calls, and writeln! macro chains. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
strands, very small regions, zero TSS/promoter distances, and percentage
calculation accuracy
negative strand downstream, exact boundaries, very large zones, and
percentage accuracy for both strands
fallback, pctg_area filtering, multiple independent groups, three-candidate
merging, no rules match fallback, and exact threshold boundaries
completely within exon, spanning multiple exons, single exon genes, beyond
distance threshold, transcript/gene level processing, and negative strand
first exon handling
characters, exact header output verification, negative coordinates,
merged transcripts format, and all strands handling
mixed valid/invalid lines, tab-only lines, and coordinate ordering
CDS/UTR entries, quoted values with spaces, no exon entries, different
sources, and max length tracking across chromosomes
extreme values, percentage ranges, report level default, and distance
overflow prevention