From 79614c6c284585d4fb1fa728e3965beeab7752d3 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 26 Feb 2012 18:40:06 +0100 Subject: ebus-racket: remove seperate ebus-header struct --- ebus-racket/parser-test.rkt | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'ebus-racket/parser-test.rkt') diff --git a/ebus-racket/parser-test.rkt b/ebus-racket/parser-test.rkt index 672dff2..1b4bc71 100644 --- a/ebus-racket/parser-test.rkt +++ b/ebus-racket/parser-test.rkt @@ -11,7 +11,6 @@ (let ([paket (parser:read-ebus (open-input-bytes (bytes 170 ; SYN - 170 170 003 ; Source 241 ; Destination @@ -30,27 +29,13 @@ 000 ; ACK 170 ; SYN 170)))]) - (check-eq? (parser:ebus-header-source (parser:ebus-paket-header paket)) 003) - (check-eq? (parser:ebus-header-destination (parser:ebus-paket-header paket)) 241) - (check-eq? (parser:ebus-header-primaryCommand (parser:ebus-paket-header paket)) 008) - (check-eq? (parser:ebus-header-secondaryCommand (parser:ebus-paket-header paket)) 000) - (check-eq? (parser:ebus-header-payloadLength (parser:ebus-paket-header paket)) 008) - (check-eq? (parser:ebus-header-payloadLength (parser:ebus-paket-header paket)) + (check-eq? (parser:ebus-paket-source paket) 003) + (check-eq? (parser:ebus-paket-destination paket) 241) + (check-eq? (parser:ebus-paket-primaryCommand paket) 008) + (check-eq? (parser:ebus-paket-secondaryCommand paket) 000) + (check-eq? (parser:ebus-paket-payloadLength paket) 008) + (check-eq? (parser:ebus-paket-payloadLength paket) (length (parser:ebus-paket-payload paket))) )))) - -;(check-equal? (my-+ 1 1) 2 "Simple addition") - - ;(check-equal? (my-* 1 2) 2 "Simple multiplication") -; -; (test-case -; "List has length 4 and all elements even" -; (let ([lst (list 2 4 6 9)]) -; (check = (length lst) 4) -; (for-each -; (lambda (elt) -; (check-pred even? elt)) -; lst))))) - (run-tests parser-test) \ No newline at end of file -- cgit v1.2.1