18.2 Assertions and fixtures
assert expris executed in all profiles, includingprod(profiles switch off only contracts, §6.7, and the output ofdbg, §2.2); on failure it prints the values of all subexpressions;assert expr, "message";assert x is T;assert_fails(expr, E);assert_snapshot(value)— comparison with a snapshot insnapshots/.- A fixture:
fixture tempDb() -> Db {
let d = Db.open("sqlite::memory:")
yield d // the test runs here
d.close()
}
test "insert" with tempDb as db { db.insert(order) }integenvironments:cluster(nodes: n, roles: […]?, db: .Builtin | url); overriding dependencies:provide Payments = FakePayments{}inside a test.
Related diagnostics
See also
Source: docs/spec/oxl-standard.en.md