Skip to content
Course map | Lesson 2 of 4

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

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br