fn assert_eq
Fails the test unless left == right; the message shows both values.
Example:
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)С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
left | &T |
right | &T |
Ошибки
panics (the test fails) with both values when they differ.
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/testing.oxl:16