Place-channel path test cases

This commit is contained in:
Kevin Tew 2011-04-19 23:31:33 -06:00
parent 4749ae9d8a
commit 3358ec8d10
2 changed files with 8 additions and 2 deletions

View File

@ -87,7 +87,7 @@
(apply make-prefab-struct
key
(map dcw (cdr (vector->list (struct->vector o)))))]
[else (error "Error not place serializable ~a" o)]))
[else (raise-mismatch-error 'place-channel-send "cannot transmit a message containing " o)]))
(dcw x))

View File

@ -1,6 +1,7 @@
(load-relative "loadtest.rktl")
(Section 'place-channel)
(require racket/flonum)
(require racket/flonum
rackunit)
(define (splat txt fn)
(call-with-output-file fn #:exists 'replace
@ -103,5 +104,10 @@ END
(place-channel-send pl pc5)
(test "Ready5" sync pc6)
(check-exn exn:fail? (λ () (place-channel-send pl (open-output-string))))
(check-not-exn (λ () (place-channel-send pl "Test String")))
(check-not-exn (λ () (place-channel-send pl (string->path "C:\\Windows"))))
(place-wait pl)
)