Skip to content

Instantly share code, notes, and snippets.



Created Jun 14, 2019
What would you like to do?
package metaobjectTest
Macro 'assert' has the following syntax:
assert expr;
'assert' is a macro keyword and 'expr' a Cyan expression. A ';'
should end the macro call.
At runtime, if 'expr' is false, an error message is issued.
The program is NOT terminated.
object Assert
func run {
assert "This message should be printed" == "";
assert "Do not print this" size > 10;
assert 0 == 0;
assert " "*3 == " ";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment