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

ABI: Refactor ABI encoding test to round-trip #701

Merged
merged 6 commits into from
Nov 30, 2022

Conversation

michaeldiamant
Copy link
Contributor

Following #700, the PR replaces discrete encode and decode tests with a single test performing a round-trip encoding-decoding-encoding.

The intent is to:

  • Confirm round-tripping does not regress.
  • Prevent test case divergence. Previously, encoding and decoding tests exercised independent test cases.

Additionally, the PR refactors towards dynamically generated tests (https://mochajs.org/#dynamically-generating-tests) so that individual test case failures can be observed.

Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

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

Looks like a good improvement, just want to check a testcase for something like tuple(int)

tests/10.ABI.ts Show resolved Hide resolved
tests/10.ABI.ts Outdated Show resolved Hide resolved
@michaeldiamant michaeldiamant merged commit 2cd2143 into develop Nov 30, 2022
@michaeldiamant michaeldiamant deleted the abi_encoding_roundtrip branch November 30, 2022 19:57
algochoi added a commit that referenced this pull request Jan 18, 2023
* ABI:  Refactor ABI encoding test to round-trip (#701)

* bump version and add to changelog

* update README.md for new version

* Packaging: Improve source map and browser usage for external bundlers (#707)

* bump version and add to changelog

* update README.md for new version

* v2: Make breaking changes from v1 to v2.0.0  (#717)

* bump version and add to changelog

* update README.md for new version

* remove enhancement section of recent changelog

* Enhancement: Add foreign array objects to ATC `addMethodCall` (#725)

* Add foreign array objects to ATC addmethodcall

* Copy array value so that inputs are not modified

Co-authored-by: Michael Diamant <[email protected]>
Co-authored-by: Lucky Baar <[email protected]>
Co-authored-by: Jason Paulos <[email protected]>
Co-authored-by: Jack Smith <[email protected]>
Co-authored-by: Barbara Poon <[email protected]>
algochoi added a commit that referenced this pull request Jan 18, 2023
* Add test for algod /v2/teal/disassemble

* Merge develop into PR (#736)

* ABI:  Refactor ABI encoding test to round-trip (#701)

* bump version and add to changelog

* update README.md for new version

* Packaging: Improve source map and browser usage for external bundlers (#707)

* bump version and add to changelog

* update README.md for new version

* v2: Make breaking changes from v1 to v2.0.0  (#717)

* bump version and add to changelog

* update README.md for new version

* remove enhancement section of recent changelog

* Enhancement: Add foreign array objects to ATC `addMethodCall` (#725)

* Add foreign array objects to ATC addmethodcall

* Copy array value so that inputs are not modified

Co-authored-by: Michael Diamant <[email protected]>
Co-authored-by: Lucky Baar <[email protected]>
Co-authored-by: Jason Paulos <[email protected]>
Co-authored-by: Jack Smith <[email protected]>
Co-authored-by: Barbara Poon <[email protected]>

* Explicitly import Buffer

* Revert test branch back to master

Co-authored-by: algochoi <[email protected]>
Co-authored-by: Lucky Baar <[email protected]>
Co-authored-by: Jason Paulos <[email protected]>
Co-authored-by: Jack Smith <[email protected]>
Co-authored-by: Barbara Poon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants