Skip to content

feat: handle edge cases in scval decoder and add tests#251

Open
Agbasimere wants to merge 1 commit into
Toolbox-Lab:mainfrom
Agbasimere:feature/scval-decoder-tests
Open

feat: handle edge cases in scval decoder and add tests#251
Agbasimere wants to merge 1 commit into
Toolbox-Lab:mainfrom
Agbasimere:feature/scval-decoder-tests

Conversation

@Agbasimere

Copy link
Copy Markdown
Contributor

Description

The argument decoder (scval_to_string) was silently ignoring complex ScVal variants, producing missing or incorrect outputs. This PR updates the decoder to accurately translate the remaining variants into readable string representations.

Changes Made

  • Added handling for ScVal::Void and empty vectors to represent empty arguments correctly.
  • Added handling for ScVal::U128 and ScVal::I128 to correctly decode max-size integers.
  • Added recursive decoding support for ScVal::Vec and ScVal::Map, allowing for nested mappings inside vectors.
  • Introduced a full unit test suite within the decode::diagnostic module to ensure all edge cases are strictly covered and verified.

Testing

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.

Write Unit Tests That Cover Every SCVal Variant the Argument Decoder Handles

1 participant