Decorators · 7.2
@test
All lessons are open — jump whenever you need.
@test marks a function as a test:
@test
fn test_sum() {
assert_eq(1 + 1, 2)
assert_eq(10 - 3, 7)
assert_ne(5, 6)
}Run with zolo test file.zolo.
Goal: Write an add function and a @test for it.
lesson-7-2.zolo
Program output
Run the code to see the output