boltlang / Bolt

A programming language for rapid application development
35 stars 1 forks source link

A test runner that prettifies `assert` statements #58

Open samvv opened 6 months ago

samvv commented 6 months ago

Create a test runner, much like pytest, that transforms the AST before actually running tests.

For example, the following test:

assert (result == 1)

Could be transformed to something like this:

if result != 1.
  fail f"{result} is not equal to {1}"

Which then displays the nice error message:

test failed: 42 is not equal to 1