Skip to content

test: add canonical JSON whitespace regression#26

Merged
DigiEmu merged 1 commit into
mainfrom
test/canonical-json-whitespace-v1
May 8, 2026
Merged

test: add canonical JSON whitespace regression#26
DigiEmu merged 1 commit into
mainfrom
test/canonical-json-whitespace-v1

Conversation

@DigiEmu
Copy link
Copy Markdown
Owner

@DigiEmu DigiEmu commented May 8, 2026

Summary

Adds a regression test proving that canonical JSON output is stable across input whitespace differences.

The test parses compact and formatted JSON with the same semantic content and verifies that both produce identical canonical JSON.

Why

DigiEmu Core depends on canonical JSON stability for deterministic hashing.

This protects against formatting drift from spaces, tabs, newlines, pretty-printed JSON, and editor/tool differences.

Test

Added:

  • TestCanonicalJSONIgnoresInputWhitespace

Verification

go test ./...

@DigiEmu DigiEmu merged commit c9f7ee7 into main May 8, 2026
5 checks passed
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