Files
sakurac/tests/programs/contracts_6.sakura
T
2026-10-28 22:13:49 -05:00

14 lines
370 B
Plaintext

# 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);
}