Files
sakurac/tests/programs/contracts_6.sakura
T

13 lines
370 B
Plaintext
Raw Normal View History

2026-10-26 10:14:11 -05:00
# What a contract says failed may be any view of text, made only where it
# fails, and a full stop it ends with is the report's own.
import std::io;
def counted(why: strview, count: i64): void {
expects(count > 0, why);
io::println($"{count} counted");
}
def main(): void {
counted("A count is above zero.", 2);
counted($"A count of {0} is above zero.", 0);
}