diff --git a/collects/htdch/installer.scm b/collects/htdch/installer.scm index 415917dca4..4c30c0e401 100644 --- a/collects/htdch/installer.scm +++ b/collects/htdch/installer.scm @@ -14,4 +14,4 @@ (idraw:installer plthome) (graph:installer plthome)) - ) \ No newline at end of file + ) diff --git a/collects/scribblings/guide/contracts-examples/1-test.ss b/collects/scribblings/guide/contracts-examples/1-test.ss index 36b3c32ec0..383d66326d 100644 --- a/collects/scribblings/guide/contracts-examples/1-test.ss +++ b/collects/scribblings/guide/contracts-examples/1-test.ss @@ -16,4 +16,3 @@ (test-true "active?" (active? 'mf)) (test-false "active? 2" (active? 'kk)) (test-true "set name" (void? (set-name 'mf "matt"))))) - diff --git a/collects/scribblings/guide/contracts-examples/1b.ss b/collects/scribblings/guide/contracts-examples/1b.ss index d95b351260..805d8549e0 100644 --- a/collects/scribblings/guide/contracts-examples/1b.ss +++ b/collects/scribblings/guide/contracts-examples/1b.ss @@ -2,12 +2,12 @@ (require "1.ss") ;; the module just above -;; implementation +;; implementation ;; [listof (list basic-customer? secret-info)] (define all '()) -(define (find c) - (define (has-c-as-key p) +(define (find c) + (define (has-c-as-key p) (id-equal? (basic-customer-id (car p)) c)) (define x (filter has-c-as-key all)) (if (pair? x) (car x) x)) @@ -33,27 +33,27 @@ (set-basic-customer-name! (car bc-with-id) name)) (define c0 0) -;; end of implementation +;; end of implementation (provide/contract - ;; how many customers are in the db? + ;; how many customers are in the db? [count natural-number/c] - ;; is the customer with this id active? + ;; is the customer with this id active? [active? (-> id? boolean?)] - ;; what is the name of the customer with this id? + ;; what is the name of the customer with this id? [name (-> (and/c id? active?) string?)] - ;; change the name of the customer with this id + ;; change the name of the customer with this id [set-name (->d ([id id?] [nn string?]) () - [result any/c] ;; result contract + [result any/c] ;; result contract #:post-cond (string=? (name id) nn))] - + [add (->d ([bc (and/c basic-customer? not-active?)]) () - ;; A pre-post condition contract must use + ;; A pre-post condition contract must use ;; a side-effect to express this contract ;; via post-conditions #:pre-cond (set! c0 count) - [result any/c] ;; result contract + [result any/c] ;; result contract #:post-cond (> count c0))]) diff --git a/collects/scribblings/guide/contracts-examples/2-test.ss b/collects/scribblings/guide/contracts-examples/2-test.ss index f90e7b2e3e..7ee93bf5f8 100644 --- a/collects/scribblings/guide/contracts-examples/2-test.ss +++ b/collects/scribblings/guide/contracts-examples/2-test.ss @@ -7,10 +7,10 @@ (define s2 (push (push s0 2) 1)) (test/text-ui - (test-suite + (test-suite "stack" - (test-true - "empty" + (test-true + "empty" (is-empty? (initialize (flat-contract integer?) =))) (test-true "push" (stack? s2)) (test-true diff --git a/collects/scribblings/guide/contracts-examples/3-test.ss b/collects/scribblings/guide/contracts-examples/3-test.ss index 93ec0e3a63..d7b5443c8b 100644 --- a/collects/scribblings/guide/contracts-examples/3-test.ss +++ b/collects/scribblings/guide/contracts-examples/3-test.ss @@ -7,7 +7,7 @@ (define d (put (put (put d0 'a 2) 'b 2) 'c 1)) (test/text-ui - (test-suite + (test-suite "dictionaries" (test-equal? "value for" 2 (value-for d 'b)) (test-false "has?" (has? (rem d 'b) 'b)) diff --git a/collects/scribblings/guide/contracts-examples/5-test.ss b/collects/scribblings/guide/contracts-examples/5-test.ss index 7ee28094d5..09cb868365 100644 --- a/collects/scribblings/guide/contracts-examples/5-test.ss +++ b/collects/scribblings/guide/contracts-examples/5-test.ss @@ -6,9 +6,9 @@ (define s (put (put (initialize (flat-contract integer?) =) 2) 1)) (test/text-ui - (test-suite + (test-suite "queue" - (test-true + (test-true "empty" (is-empty? (initialize (flat-contract integer?) =))) (test-true "put" (queue? s))