You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tests): align test fixtures with Quasar's compact wire format
The Quasar `#[account]` and `#[instruction]` derive macros use a single
"compact" wire layout: a header containing all fixed-size fields and
length prefixes grouped together, followed by a tail with all dynamic
byte payloads grouped together. The previous tests assumed an
interleaved field-by-field layout with u32 length prefixes, which never
matched the program code that was already migrated to the compact
format.
Two consequences flowed from that mismatch:
1. Length prefixes for `String<MAX>` default to a single byte (the
second `String` generic argument is the prefix type and its default
is `u8`). The tests were using u32 prefixes, so the program rejected
the instruction data or wrote wildly wrong account contents.
2. The compact format groups all length prefixes ahead of the data
bytes; the tests expected each prefix to immediately precede its
own bytes.
This commit rewrites the failing test fixtures so they encode and
decode the same compact format the programs already produce. The
program code itself is not changed — programs are canonical, tests
follow.
Also removes a stray `rent` sysvar account from the
`tokens/pda-mint-authority` `create_mint` test: the program's
`CreateMint` accounts struct no longer takes a rent sysvar, so the
extra entry was shifting `token_program` and `system_program` to
the wrong slots.
Projects fixed:
basics/account-data
basics/close-account
basics/favorites
basics/realloc
basics/rent
basics/repository-layout
tokens/pda-mint-authority
0 commit comments