Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSHooks] Add sto tests #460

Merged
merged 3 commits into from
Mar 12, 2025
Merged

[JSHooks] Add sto tests #460

merged 3 commits into from
Mar 12, 2025

Conversation

tequdev
Copy link
Collaborator

@tequdev tequdev commented Mar 11, 2025

High Level Overview of Change

add tests for

  • sto_erase
  • sto_from_json
  • sto_subarray
  • sto_subfield
  • sto_to_json
  • sto_validate

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

env.fund(XRP(10000), bob);

TestHook hook = jswasm[R"[test.hook](
const ASSERT = (x) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment:
ASSERT_EQ that traced the arguments would be nice for debug

{
const buf = sto_erase(sto, 0x80002)
// TODO: https://github.com/Xahau/xahaud/issues/459
// ASSERT(buf === DOESNT_EXIST)

This comment was marked as off-topic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I have not changed the file in this PR, I will leave the formatting to the JSHooks main PR.

@sublimator
Copy link
Collaborator

sublimator commented Mar 12, 2025 via email

@dangell7 dangell7 merged commit eaa2cc9 into Xahau:jshooks Mar 12, 2025
2 checks passed
@tequdev tequdev deleted the jshooks-sto-tests branch March 14, 2025 15:58
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.

3 participants