Miscellaneous

Tests

You can write unit tests for code in test blocks.

A test can also be marked summon or trusted if necessary.
A test with extern modifiers will only run if those externs are available.

All test blocks in all imported files are included. (The below example runs more than 2 tests, becuase it picked up some tests from the standard library.)

import crow/io/print: out, print crow/test-util/test-runner: run-all-tests main void() summon run-all-tests test 1::nat + 1 is 2 2::nat + 2 is 4 test summon, trusted, native extern x nat = 3 out print "The pointer value is {(&x)::nat*.to::nat}"

The standard import

All Crow modules automatically import the file include/crow/std.crow from where you downloaded Crow.
You can turn this off by writing no-std at the top of a file; though there's no real reason to do so.
(This does not disable the runtime, which is still used implicitly.)

no-std import crow/log: info, log crow/misc: void main void() info log "Hello, world!"