OxL Reference

fn assert_eq

Fails the test unless left == right; the message shows both values.

Example:

oxl✓ checked in CI
test "sum of two numbers" {
  assert_eq(1 + 1, 2)
  assert_eq("a".repeat(2), "aa")
}
pub(api) fn assert_eq<T: Eq>(left: &T, right: &T)

Since. 1.0.0-beta

Parameters

NameType
left&T
right&T

Errors

panics (the test fails) with both values when they differ.

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/testing.oxl:16

See also