How to Design Programs Languages

1`` | Beginning Student
2`` | Beginning Student with List Abbreviations
3`` | Intermediate Student
4`` | Intermediate Student with Lambda
5`` | Advanced Student
| Index

On this page:

check-expect
check-within
check-error

Version: 4.0.2
contents index
← prev up next →

#### 1.9`` Test Cases

(check-expect expr expr)

A test case to check that the first expr produces the same value as the second expr, where the latter is normally an immediate value.

(check-within expr expr expr)

Like check-expect, but with an extra expression that produces a number delta. The test case checks that each number in the result of the first expr is within delta of each corresponding number from the second expr.

(check-error expr expr)

A test case to check that the first expr signals an error, where the error messages matches the string produced by the second expr.

contents index
← prev up next →