Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

MEMCPY.json in Tests/ is not a valid JSON #322

Closed
fyrchik opened this issue May 21, 2020 · 1 comment · Fixed by #323
Closed

MEMCPY.json in Tests/ is not a valid JSON #322

fyrchik opened this issue May 21, 2020 · 1 comment · Fixed by #323
Assignees

Comments

@fyrchik
Copy link
Contributor

fyrchik commented May 21, 2020

It has // comments which are not permitted by JSON specification.
https://github.com/neo-project/neo-vm/blob/master/tests/neo-vm.Tests/Tests/OpCodes/Splice/MEMCPY.json

@ixje
Copy link
Contributor

ixje commented May 21, 2020

Perhaps this is a good moment to revive #94 and agree on a standard to enforce for NEO3? We can use a json schema + validator to make sure all json files pass.

Other items I'd like to include:

  • not all tests have a name field (e.g. TRHOW, ABORT,ASSERT, PUSHM1_to_PUSH16, PUSHINT8_to_PUSHINT256.json)
  • hex strings are sometimes prefixed with 0x and sometimes not. Let's just fix them in some format (either with or without)
  • Restrict elements in the list under the script key to be either an instruction name or a hex string. Not "PUSH0*1048576" like CAT.json has.

@shargon shargon self-assigned this May 21, 2020
shargon added a commit that referenced this issue Aug 6, 2020
* fix last bit of #322

* Remove * logic

* Clean using

* Fix PUSHDATA4

Co-authored-by: Shargon <shargon@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants