Created
March 26, 2018 15:32
-
-
Save jmercouris/f40f2436d424c6e54ec486276f17e0df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; 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