Skip to content

Comments

feat: Add 66 new unit tests for error types, overlap cases, GTF parsing, and rules#12

Closed
TianYuan-Liu wants to merge 2 commits intomasterfrom
continuous-claude/iteration-11/2026-01-30-e2bf905a
Closed

feat: Add 66 new unit tests for error types, overlap cases, GTF parsing, and rules#12
TianYuan-Liu wants to merge 2 commits intomasterfrom
continuous-claude/iteration-11/2026-01-30-e2bf905a

Conversation

@TianYuan-Liu
Copy link
Member

Error Types (9 tests): Display and Error trait implementations for
ParseStrandError, ParseAreaError, ParseReportLevelError, plus Clone
implementations for all error types.

match_region_to_genes Overlap Cases (12 tests): Exhaustive coverage of
exon/region spatial relationships including exon before region, partial
overlaps (left/right), exon inside region, region inside exon, upstream
regions, negative strand handling, TSS/TTS checking, and multi-transcript
scenarios.

GtfData Struct (7 tests): max_lengths calculation, multiple genes and
chromosomes, clone implementation, exon-only GTF files, invalid strand
skipping, and custom gene/transcript tags.

BedReader Edge Cases (9 tests): Very long lines, special chromosome names,
zero and large coordinates, metadata with special characters, chunk
boundary handling, whitespace in metadata, and negative coordinates.

Config Default Rules (4 tests): DEFAULT_RULES order and length
verification, Config rules matching defaults, and tag defaults.

match_regions_to_genes Integration (4 tests): Empty input/genes handling,
multiple sorted regions, and max_gene_length usage.

TSS/TTS Boundaries (9 tests): Exact boundary conditions, zero values,
very large values, and negative strand coordinate handling.

apply_rules Edge Cases (5 tests): Same area different percentages, empty
rules fallback, pctg thresholds, multiple independent groups, and order
preservation.

select_transcript Edge Cases (4 tests): Merge max percentages, different
areas priority, fallback behavior, and merged transcript IDs.

Output Formatting (5 tests): Varying meta columns, all areas output,
decimal precision, region ID format, and midpoint calculation.

Total test count increased from 282 to 348 tests.

TianYuan-Liu and others added 2 commits January 30, 2026 02:39
…ng, and rules

Add comprehensive test coverage across multiple modules:

Error Types (9 tests): Display and Error trait implementations for
ParseStrandError, ParseAreaError, ParseReportLevelError, plus Clone
implementations for all error types.

match_region_to_genes Overlap Cases (12 tests): Exhaustive coverage of
exon/region spatial relationships including exon before region, partial
overlaps (left/right), exon inside region, region inside exon, upstream
regions, negative strand handling, TSS/TTS checking, and multi-transcript
scenarios.

GtfData Struct (7 tests): max_lengths calculation, multiple genes and
chromosomes, clone implementation, exon-only GTF files, invalid strand
skipping, and custom gene/transcript tags.

BedReader Edge Cases (9 tests): Very long lines, special chromosome names,
zero and large coordinates, metadata with special characters, chunk
boundary handling, whitespace in metadata, and negative coordinates.

Config Default Rules (4 tests): DEFAULT_RULES order and length
verification, Config rules matching defaults, and tag defaults.

match_regions_to_genes Integration (4 tests): Empty input/genes handling,
multiple sorted regions, and max_gene_length usage.

TSS/TTS Boundaries (9 tests): Exact boundary conditions, zero values,
very large values, and negative strand coordinate handling.

apply_rules Edge Cases (5 tests): Same area different percentages, empty
rules fallback, pctg thresholds, multiple independent groups, and order
preservation.

select_transcript Edge Cases (4 tests): Merge max percentages, different
areas priority, fallback behavior, and merged transcript IDs.

Output Formatting (5 tests): Varying meta columns, all areas output,
decimal precision, region ID format, and midpoint calculation.

Total test count increased from 282 to 348 tests.
Run cargo fmt to fix line length and indentation issues detected by CI.

Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
@TianYuan-Liu TianYuan-Liu deleted the continuous-claude/iteration-11/2026-01-30-e2bf905a branch January 30, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant