Skip to content

Add derive coverage for big-endian field representations#160

Open
daixihegu wants to merge 1 commit into
zkcrypto:mainfrom
daixihegu:main
Open

Add derive coverage for big-endian field representations#160
daixihegu wants to merge 1 commit into
zkcrypto:mainfrom
daixihegu:main

Conversation

@daixihegu

@daixihegu daixihegu commented Jun 24, 2026

Copy link
Copy Markdown

This PR adds test coverage for #[derive(PrimeField)] when using
#[PrimeFieldReprEndianness = "big"].

The existing derive tests exercise little-endian representations, but the derive
macro also supports big-endian representations. The new test defines a small
prime field, checks that to_repr emits the expected big-endian bytes, and
verifies that both from_repr and from_repr_vartime round-trip correctly.

I have test this change by executing:

  • cargo test --all-features
  • cargo test --no-default-features --features derive
  • cargo fmt -- --check

Signed-off-by: daixihegu <daixihegu@163.com>
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