tact icon indicating copy to clipboard operation
tact copied to clipboard

Add tests with all possible exit codes

Open anton-trunov opened this issue 1 year ago • 1 comments

https://github.com/ton-community/tact-fireworks does an amazing job at this.

One solution would be to add tact-fireworks to CI to make sure we stay in sync.

Here is a list of what we should test:

  • [ ] integer overflow (addition, subtracts, negation, multiplication, division)
  • [ ] division by zero (division, modulo)
  • [ ] cell overflow (data)
  • [ ] cell overflow (refs)
  • [ ] cell underflow (data)
  • [ ] cell underflow (refs)
  • [ ] repeat-loop's out-of-bounds counter
  • [ ] ...

TODO: add more things from https://docs.tact-lang.org/book/exit-codes and various parts of tact-docs

anton-trunov avatar Mar 12 '24 20:03 anton-trunov

Looks like this is going to be easier when #212 is merged -- exit codes can then be easily returned from getters and checked in tests

anton-trunov avatar Apr 02 '24 19:04 anton-trunov