From a1062c49f9882b6c9170db340844bf777fec67df Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Thu, 14 Jan 2010 21:24:47 +0000 Subject: [PATCH] Types for the other `check-expect'-style forms. svn: r17657 original commit: 104adf9c62a458e848019fc2331184c8c83ab29e --- .../tests/typed-scheme/succeed/check-within.ss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 collects/tests/typed-scheme/succeed/check-within.ss diff --git a/collects/tests/typed-scheme/succeed/check-within.ss b/collects/tests/typed-scheme/succeed/check-within.ss new file mode 100644 index 00000000..30564384 --- /dev/null +++ b/collects/tests/typed-scheme/succeed/check-within.ss @@ -0,0 +1,17 @@ + +#lang typed-scheme + +(require scheme/math typed/test-engine/scheme-tests) + +(define-struct: circle ({radius : Number})) +(: circle-area (circle -> Number)) + +(check-within (+ 1 2.14) pi .1) +(check-range 2 1 3) +(check-member-of 'a 'b 'c 'd 'a 'z) +(check-error (error "fail") "fail") + +(define (circle-area c) + (* pi (circle-radius c) (circle-radius c))) + +(test) \ No newline at end of file