Skip to content

test: slim testIDT.cpp — spot-checks and fingerprints (#276) - #317

Open
VedantMadane wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
VedantMadane:test/slim-testidt-276
Open

test: slim testIDT.cpp — spot-checks and fingerprints (#276)#317
VedantMadane wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
VedantMadane:test/slim-testidt-276

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

Implements #276: slim tests/testIDT.cpp by removing redundant full-table literals.

Before: ~5.6k lines / ~400KB
After: ~800 lines / ~32KB

Approach

  • Fixture loaders (camera SPST, illuminant, training data, CMF): assert structure + spot-check first/mid/last samples instead of embedding the entire JSON curve in C++.
  • Transforms (scale LSC, TI, XYZ, RGB, chosen illuminants): keep a few sample OIIO_CHECK_EQUAL_THRESH values and assert a deterministic FNV-1a fingerprint over IEEE754 little-endian doubles for the full result.
  • Left small 3-element WB/CM/IDT expected matrices as-is (already tiny).

Test plan

  • Configure + build with usual rawtoaces_data dependency
  • Run testIDT (or full unit test suite) on CI linux/mac/windows
  • If a fingerprint mismatches only on a specific endian/FPU platform, document and adjust (hashes are LE double FNV-1a)

Closes #276

…wareFoundation#276)

Replace large embedded numeric tables with first/last (and mid) sample
assertions for fixture loads, and FNV-1a fingerprints over little-endian
doubles for transformation outputs (TI/XYZ/RGB and scaled illuminant).
Preserves coverage while cutting thousands of hard-to-review literal lines.

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

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.

[tests] Slim down testIDT.cpp — spot-checks for fixtures, fingerprints for transforms

1 participant