diff --git a/xenomorph/xenomorph/test/array-test.rkt b/xenomorph/xenomorph/test/array-test.rkt index e6c7e3f7..c3911283 100644 --- a/xenomorph/xenomorph/test/array-test.rkt +++ b/xenomorph/xenomorph/test/array-test.rkt @@ -31,12 +31,12 @@ https://github.com/mbutterick/restructure/blob/master/test/Array.coffee (test-case "array: decode length from parent key" (parameterize ([current-input-port (open-input-bytes (bytes 1 2 3 4 5))]) - (check-equal? (send (+xarray #:type uint8 #:length 'len) xxdecode (current-input-port) (mhash 'len 4)) '(1 2 3 4)))) + (check-equal? (decode (+xarray #:type uint8 #:length 'len) (current-input-port) #:parent (mhash 'len 4)) '(1 2 3 4)))) (test-case "array: decode byte count from parent key" (parameterize ([current-input-port (open-input-bytes (bytes 1 2 3 4 5))]) - (check-equal? (send (+xarray #:type uint16be #:length 'len #:count-bytes #t) xxdecode (current-input-port) (mhash 'len 4)) '(258 772)))) + (check-equal? (decode (+xarray #:type uint16be #:length 'len #:count-bytes #t) (current-input-port) #:parent (mhash 'len 4)) '(258 772)))) (test-case "array: decode length as number before array" @@ -61,12 +61,12 @@ https://github.com/mbutterick/restructure/blob/master/test/Array.coffee (test-case "array: decode to the end of parent if no length given" (parameterize ([current-input-port (open-input-bytes (bytes 1 2 3 4 5))]) - (check-equal? (send (+xarray #:type uint8) xxdecode (current-input-port) (mhash '_length 4 '_startOffset 0)) '(1 2 3 4)))) + (check-equal? (decode (+xarray #:type uint8) (current-input-port) #:parent (mhash '_length 4 '_startOffset 0)) '(1 2 3 4)))) (test-case "array: decode to the end of the stream if parent exists, but its length is 0" (parameterize ([current-input-port (open-input-bytes (bytes 1 2 3 4 5))]) - (check-equal? (send (+xarray #:type uint8) xxdecode (current-input-port) (mhash '_length 0 '_startOffset 0)) '(1 2 3 4 5)))) + (check-equal? (decode (+xarray #:type uint8) (current-input-port) #:parent (mhash '_length 0 '_startOffset 0)) '(1 2 3 4 5)))) (test-case "array: decode to the end of the stream if no parent and length is given" diff --git a/xenomorph/xenomorph/test/string-test.rkt b/xenomorph/xenomorph/test/string-test.rkt index 2226e5da..881611d0 100644 --- a/xenomorph/xenomorph/test/string-test.rkt +++ b/xenomorph/xenomorph/test/string-test.rkt @@ -26,12 +26,12 @@ https://github.com/mbutterick/restructure/blob/master/test/String.coffee (test-case "string: decode length from parent key" (parameterize ([current-input-port (open-input-bytes #"testing")]) - (check-equal? (send (+xstring 'len) xxdecode (current-input-port) (mhash 'len 7)) "testing"))) + (check-equal? (decode (+xstring 'len) (current-input-port) #:parent (mhash 'len 7)) "testing"))) (test-case "string: decode length as number before string" (parameterize ([current-input-port (open-input-bytes #"\x07testing")]) - (check-equal? (send (+xstring uint8) xxdecode (current-input-port) (mhash 'len 7)) "testing"))) + (check-equal? (decode (+xstring uint8) (current-input-port) #:parent (mhash 'len 7)) "testing"))) (test-case "string: decode utf8"