summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Brannon <chris@the-brannons.com>2021-04-05 05:58:30 -0700
committerChristopher Brannon <chris@the-brannons.com>2021-04-05 05:59:32 -0700
commit65760f759aa2ac31f237e67e15711bf19d50057f (patch)
treeb5a0ed1ba2353357f084ca275b81f23e650e89cf
parent58e4d2539370035095bbb662ffca7b87a2790720 (diff)
downloadchicken-xml-rpc-3.0.tar
chicken-xml-rpc-3.0.tar.gz
chicken-xml-rpc-3.0.tar.bz2
chicken-xml-rpc-3.0.tar.lz
chicken-xml-rpc-3.0.tar.xz
chicken-xml-rpc-3.0.tar.zst
chicken-xml-rpc-3.0.zip
Add error tests for a couple more things that can't be marshaled.3.0
Namely complex numbers and procedures. Assert that attempting to marshal them results in an error.
-rw-r--r--tests/run.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 439cecd..90109c3 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -164,7 +164,10 @@
(parameterize ((xml-rpc-unparsers
`((,vector? . ,vector->xml-rpc-iso8601))))
(value->xml-rpc-fragment (vector 55 8 14 17 6 98 0 0 #f 0))))
- (define-record foo bar)
+ (test-error "complex number gives error"
+ (value->xml-rpc-fragment 2+3i))
+ (test-error "procedure gives error"
+ (value->xml-rpc-fragment string?))
(test-error "unknown type gives error"
(value->xml-rpc-fragment (make-foo 1))))