Macro in tests coil-stdlib

eq!

macro eq(Expr lhs, Expr rhs) -> Code
Import
use tests::{eq};
Source: src/tests.hy

Expands to lhs == rhs.

Invoke it as eq!(…); the arguments are passed as code (Expr), not values.

Parameters#

NameType
lhsExpr
rhsExpr

Returns#

Code

Examples#

use tests::{assert, eq};
assert!(eq!(2 + 2, 4));

See also#

  • not!: Expands to !expression.
  • matches!: Returns whether expr matches the pattern ty, as a bool.
  • type!: Expands to typeof ty: the type of an expression, as a value that can be compared.
  • and!: Expands to lhs && rhs.
  • assert!: Fails the enclosing function with an error when condition is false.
↑ ↓ navigate ↵ open