feat: Add 80 new unit tests for overlap, output, error types, GTF, config, and BED modules#11
Closed
TianYuan-Liu wants to merge 2 commits intomasterfrom
Closed
Conversation
…nfig, and BED modules Add comprehensive test coverage across multiple modules: - match_regions_to_genes tests (8): Empty input handling, multiple regions with single gene, region order preservation, last_index optimization, large gene lengths, negative strand genes, and multiple overlapping genes - process_candidates_for_output gene level tests (7): Single/multiple transcript handling, area merging, gene filtering, and exon number merging - Error type display tests (9): Verify Display and std::error::Error trait implementations for ParseStrandError, ParseAreaError, and ParseReportLevelError, plus Clone/Eq trait verification - Overlap edge case tests (12): Exon boundary conditions, intron regions, single base exons, strand-specific upstream/downstream, TTS scenarios, many-exon genes, and distance threshold handling - GTF extract_attribute tests (8): Attributes with equals signs, numbers-only values, empty values, dots/underscores/hyphens, order independence, and missing trailing semicolons - Config extended tests (10): new()/default() equivalence, Clone/Debug traits, max_lookback_distance with various parameter combinations, parse_rules order preservation, and set_distance_kb edge cases - TssExonInfo/TtsExonInfo tests (4): Field access and negative/zero values - Transcript level processing tests (4): Filtering by transcript, multiple transcripts, and percentage threshold filtering - BED reader extended tests (5): Very long lines, max metadata columns, scientific notation handling, Windows line endings, and mixed whitespace - check_tss/check_tts edge case tests (13): Single bp regions, exact boundary conditions, percentage calculations, zero distances, large zones, and spanning multiple zones Unit tests increased from 282 to 362 tests total.
Format write! and writeln! macro calls in test_bed_reader_windows_line_endings and test_bed_reader_multiple_reads_until_eof to pass cargo fmt --check. 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.
match_regions_to_genes tests (8): Empty input handling, multiple regions
with single gene, region order preservation, last_index optimization,
large gene lengths, negative strand genes, and multiple overlapping genes
process_candidates_for_output gene level tests (7): Single/multiple
transcript handling, area merging, gene filtering, and exon number merging
Error type display tests (9): Verify Display and std::error::Error trait
implementations for ParseStrandError, ParseAreaError, and ParseReportLevelError,
plus Clone/Eq trait verification
Overlap edge case tests (12): Exon boundary conditions, intron regions,
single base exons, strand-specific upstream/downstream, TTS scenarios,
many-exon genes, and distance threshold handling
GTF extract_attribute tests (8): Attributes with equals signs, numbers-only
values, empty values, dots/underscores/hyphens, order independence, and
missing trailing semicolons
Config extended tests (10): new()/default() equivalence, Clone/Debug traits,
max_lookback_distance with various parameter combinations, parse_rules
order preservation, and set_distance_kb edge cases
TssExonInfo/TtsExonInfo tests (4): Field access and negative/zero values
Transcript level processing tests (4): Filtering by transcript, multiple
transcripts, and percentage threshold filtering
BED reader extended tests (5): Very long lines, max metadata columns,
scientific notation handling, Windows line endings, and mixed whitespace
check_tss/check_tts edge case tests (13): Single bp regions, exact
boundary conditions, percentage calculations, zero distances, large zones,
and spanning multiple zones
Unit tests increased from 282 to 362 tests total.