On this page:
current-input-encoder
current-output-decoder
current-expected-masker
exit-code-mask
check-validator
check-validator-exn
8.10
3.7.1 Test Suite Utils

parameter

(current-input-encoder)  (-> any/c any/c)

(current-input-encoder encoder)  void?
  encoder : (-> any/c any/c)
 = values
An encode capable of transforming a Racket value into a valid value in the current CPSC411 language.

parameter

(current-output-decoder)  (-> any/c any/c)

(current-output-decoder decoder)  void?
  decoder : (-> any/c any/c)
 = values
A reader, capable of decoding a CPSC411 value either from an interpreter or from compilation into a Racket value. Typically, you should use execute and current-run/read instead.

parameter

(current-expected-masker)  (-> any/c any/c)

(current-expected-masker masker)  void?
  masker : (-> any/c any/c)
 = values
A masker, masking an expected test Racket value to match the return value interface of the CPSC411 compiler. Probably either the default or set to exit-code-mask for a1.

procedure

(exit-code-mask v)  (between/c 0 255)

  v : any/c
Mask a Racket value to the range of an exit code.

procedure

(check-validator f x)  void?

  f : (-> any/c any/c)
  x : any/c
Tests that the validator f returns x without raising an error.

procedure

(check-validator-exn f x)  void?

  f : (-> any/c any/c)
  x : any/c
Tests that the validator f raises an exception when called on x.