nanolang/docs/SHADOW_TESTS.md at Main · Jordanhubbard/Nanolang

rw-book-cover

Metadata

Highlights

  • Shadow-tests are mandatory test blocks that “shadow” every function in nanolang. They: Run at compile time - Execute during compilation, not at runtime Are mandatory - Code without shadow-tests won’t compile Prove correctness - Failed tests = failed compilation Document behavior - Show how functions should be used Are stripped in production - Zero runtime overhead (View Highlight)