unit-test
Factor handbook > Developer tools > Unit testing

Next:must-fail


Vocabulary
tools.test

Syntax
{ output } [ input ] unit-test


Inputs and outputs
outputa sequence of expected stack elements
inputa quotation run with an empty stack


Word description
Runs a quotation with an empty stack, comparing the resulting stack with output. Elements are compared using =. Throws an error if the expected stack does not match the resulting stack.

Definition