Next: , Previous: , Up: API  


1.7 (veritas diff)

A short explanation of where two values differ, for an assertion that failed. The expect/got pair already says what the values were; this says which element or character went wrong, which is what a reader misses when the values are long.

1.7.1 Procedures

Procedure: render-diff expect got

Return a short explanation of where expect and got differ.

Only strings, lists and vectors are described; #f means there is nothing useful to add - the values are equal, or they are of a kind a positional diff says nothing about.

(render-diff '(1 2 3) '(1 2 9))
⇒ "  lists differ at index 2 (expected 3, got 9); lengths 3 and 3"