# expected: 10
proc assert {expr_str} {
    set result [uplevel 1 [list expr $expr_str]]
    if {!$result} {
        error "Assertion failed: $expr_str"
    }
}

set x 42
assert {$x == 42}
assert {$x > 0}
set x 10
assert {$x < 100}
set x
