Skip to content

Conversation

@rpuneet
Copy link
Contributor

@rpuneet rpuneet commented Feb 8, 2026

Summary

  • Add comprehensive integration tests for MakerNote registry detection
  • Tests verify detection for all 4 supported manufacturers
  • Includes benchmarks for performance validation

Test Coverage

Test Description
TestMakerNoteRegistryDetection Detection tests for Nikon, Sony, Fujifilm, Canon
TestMakerNoteDetectionOrder Priority verification (specific headers before Canon fallback)
TestMakerNoteMalformedHeaders Graceful handling of invalid data
TestMakerNoteBoundaryConditions Edge cases (max entries, min offsets)
TestMakerNoteConcurrentDetection Thread safety verification
TestMakerNoteRealFile Real file parsing (skipped if testdata unavailable)

Benchmarks

BenchmarkMakerNoteDetect_Nikon      346.9 ns/op    64 B/op    1 allocs/op
BenchmarkMakerNoteDetect_Sony       362.6 ns/op    64 B/op    1 allocs/op
BenchmarkMakerNoteDetect_Fujifilm   589.0 ns/op    64 B/op    1 allocs/op
BenchmarkMakerNoteDetect_Canon      484.2 ns/op    64 B/op    1 allocs/op
BenchmarkMakerNoteDetect_Unknown    279.8 ns/op     0 B/op    0 allocs/op

Test plan

  • All existing tests pass
  • New integration tests pass
  • Benchmarks run successfully
  • Verify with make build and CLI testing

Partial work on #15 - remaining items: fuzz tests, per-manufacturer parse benchmarks

🤖 Generated with Claude Code

Add comprehensive integration tests for the MakerNote registry:
- Detection tests for all manufacturers (Nikon, Sony, Fujifilm, Canon)
- Detection order/priority verification
- Malformed header handling
- Boundary condition tests
- Concurrent detection safety
- Benchmarks for detection performance

Tests verify:
- Nikon Type 1 and Type 3 format detection
- Sony DSC/CAM header detection
- Fujifilm header and offset parsing
- Canon IFD fallback detection
- Unknown manufacturer handling
- Thread safety of registry operations

Benchmark results show fast detection (~300-600ns) with minimal
allocations (1 alloc per detect, 0 for unknown).

Partial work on #15 (MakerNote integration tests)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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