Skip to content

test: add cross-platform and endianness tests - #142

Merged
Ayinkx01 merged 1 commit into
StellarFoundry:mainfrom
jiggy-techy:test/cross-platform-endianness
Oct 28, 2026
Merged

Ayinkx01 merged 1 commit into
StellarFoundry:mainfrom
jiggy-techy:test/cross-platform-endianness

Conversation

@jiggy-techy

Copy link
Copy Markdown
Contributor

Summary

Adds explicit cross-platform and endianness coverage.

  • crates/devkit-xdr/tests/endianness.rs pins XDR's big-endian wire format with explicit byte arrays for ScVal::U32, ScVal::I32, and ScVal::I64, round-trips them, and asserts host-independent base64/JSON output.
  • crates/devkit-core/tests/cross_platform.rs asserts that native and forward-slash paths produce identical components, that interior . components are removed, and that parsers accept CRLF input.
  • crates/devkit-cli/tests/path_normalization.rs runs inspect-wasm with a native path, a forward-slash path, and a path containing .., requiring byte-identical JSON output.
  • Documents the strategy in docs/TESTING.md and CHANGELOG.md.

Verification

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all

All pass locally (Windows). The added tests use explicit bytes and path components, so they are also valid on the Linux and macOS CI runners.

Closes #91

Pin XDR big-endian encoding with explicit byte sequences, assert path separator and current-directory normalization, and require byte-identical inspect-wasm output for native, forward-slash, and parent-directory paths. Document the cross-platform test strategy in the testing guide.

Closes StellarFoundry#91
@jiggy-techy
jiggy-techy requested a review from Ayinkx01 as a code owner October 28, 2026 15:17
@Ayinkx01
Ayinkx01 merged commit 7d6cd53 into StellarFoundry:main Oct 28, 2026
6 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.

test: add cross-platform and endianness tests

3 participants