Skip to content

Instantly share code, notes, and snippets.

@jmercouris
Created March 26, 2018 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmercouris/f40f2436d424c6e54ec486276f17e0df to your computer and use it in GitHub Desktop.
Save jmercouris/f40f2436d424c6e54ec486276f17e0df to your computer and use it in GitHub Desktop.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Server
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun |validator1.manyTypesTest| (boolean string)
(assert
(and (or (null boolean) (eq boolean t))
(stringp string)))
(list boolean string))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Client
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun many-types-test ()
(let* ((boolean (if (zerop (random 2)) t nil))
(string (random-string))
(result (xml-rpc-call (encode-xml-rpc-call :|validator1.manyTypesTest|
boolean
string))))
(format t
"validator1.manyTypesTest(~s,~s)=~s~%"
boolean
string)
(assert (equal boolean (elt result 1)))
(assert (equal string (elt result 2)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment