summaryrefslogtreecommitdiff
path: root/ebus-racket/parser-test.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'ebus-racket/parser-test.rkt')
-rw-r--r--ebus-racket/parser-test.rkt41
1 files changed, 0 insertions, 41 deletions
diff --git a/ebus-racket/parser-test.rkt b/ebus-racket/parser-test.rkt
deleted file mode 100644
index 1b4bc71..0000000
--- a/ebus-racket/parser-test.rkt
+++ /dev/null
@@ -1,41 +0,0 @@
-#lang racket
-(require rackunit
- rackunit/text-ui
- (prefix-in parser: "parser.rkt"))
-
-(define parser-test
- (test-suite
- "Tests for Ebus Parser"
- (test-case
- "Test sample Master-Master Paket"
- (let
- ([paket (parser:read-ebus (open-input-bytes (bytes
- 170 ; SYN
- 170
- 003 ; Source
- 241 ; Destination
- 008 ; primaryCommand
- 000 ; secondaryCommand
- 008 ; payloadLength
- 128 ; p1
- 040 ; p2
- 230 ; p3
- 002 ; p4
- 000 ; p5
- 002 ; p6
- 000 ; p7
- 010 ; p8
- 128 ; CRC
- 000 ; ACK
- 170 ; SYN
- 170)))])
- (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)))
- ))))
-
-(run-tests parser-test) \ No newline at end of file