OxL Reference

tests/money_test.oxl

oxl
use super.model { Money }
use std.ser { encode }

// Обычный юнит-тест (V.5)
test "money arithmetic" {
  assert Money.rub(10) + Money.rub(5) == Money.rub(15)
  assert Money.rub(2) * 3 == Money.rub(6)
  assert Money.ZERO + Money.rub(1) == Money.rub(1)
  let a = Money.rub(1)
  let b = 100i64
  assert encode(&a)! == encode(&b)!      // по сети Money — это i64 в копейках
}

Source: examples/shop/tests/money_test.oxl