assert= ( a b -- ) (original) (raw)

assert= ( a b -- )
Assertions

Prev: assert ( got expect -- * )

Vocabulary
kernel

Inputs

a an object
b an object

Outputs
None

Word description
Throws an assert error if a does not equal b.

Definition

IN: kernel

: assert= ( a b -- ) 2dup = [ 2drop ] [ assert ] if ;