Skip to content

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

Merged
michaeldiamant merged 6 commits into
developfrom
abi_encoding_roundtrip
Nov 30, 2022
Merged

ABI: Refactor ABI encoding test to round-trip#701
michaeldiamant merged 6 commits into
developfrom
abi_encoding_roundtrip

Conversation

@michaeldiamant
Copy link
Copy Markdown
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.

@michaeldiamant michaeldiamant marked this pull request as ready for review November 30, 2022 14:16
Copy link
Copy Markdown
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
Copy Markdown
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)

Comment thread tests/10.ABI.ts
Comment thread tests/10.ABI.ts Outdated
@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 <michaeldiamant@users.noreply.github.com>
Co-authored-by: Lucky Baar <lucky.baar@algorand.com>
Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
Co-authored-by: Jack Smith <jack.smith@algorand.com>
Co-authored-by: Barbara Poon <barbara.poon@algorand.com>
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 <michaeldiamant@users.noreply.github.com>
Co-authored-by: Lucky Baar <lucky.baar@algorand.com>
Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
Co-authored-by: Jack Smith <jack.smith@algorand.com>
Co-authored-by: Barbara Poon <barbara.poon@algorand.com>

* Explicitly import Buffer

* Revert test branch back to master

Co-authored-by: algochoi <86622919+algochoi@users.noreply.github.com>
Co-authored-by: Lucky Baar <lucky.baar@algorand.com>
Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
Co-authored-by: Jack Smith <jack.smith@algorand.com>
Co-authored-by: Barbara Poon <barbara.poon@algorand.com>
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