Skip to content

Commit a13f476

Browse files
refactor(test): reduce cyclomatic complexity in test helpers to reach goreportcard 100% gocyclo
Extract inline closures and large sub-test bodies into package-level helper functions across four test files, bringing all flagged functions below the gocyclo threshold of 15: - metadata_test.go: TestMetadataSetters (41→<15) — 15 testSetXxx helpers - read_test.go: TestMetadata_NilMetadata (27→<15) — assertNilStringAccessors + assertNilBoolAccessors - metadata_convenience_test.go: buildTIFFMultiIFD (26→<15) — tiffPlaceEntries + tiffWriteIFD - metadata_convenience_test.go: TestMetadata_ExifIFDMultipleTagsCoexist (18→<15) — assert helpers - exif/exif_test.go: buildCameraEXIF (18→<15) — split into entry-builder functions - exif/exif_test.go: TestEXIFSetters (23→<15) — testEXIFSetXxx helpers + newMinimalEXIF + exifRoundTrip No production code changed. All 25 packages pass go test ./...
1 parent aa8ca3c commit a13f476

4 files changed

Lines changed: 695 additions & 542 deletions

File tree

0 commit comments

Comments
 (0)