(use testeez uuid-ossp) ;; This test set was adapted for testeez from uuid-ossp-test.scm (testeez "uuid-ossp" (test/eqv "Nil (1)" (uuid? (make-uuid)) #t) (test/eqv "Nil (2)" (uuid-nil? (make-uuid)) #t) (test/eqv "Nil (4)" (uuid-nil? (uuid-clone (make-uuid))) #t) (test/eqv "Nil (5)" (uuid-nil? (uuid-load "nil")) #t) (test/eqv "uuid=?" (uuid=? (make-uuid) (make-uuid)) #t) (test/eqv "uuid<=?" (uuid<=? (make-uuid) (make-uuid)) #t) (test/eqv "uuid>=?" (uuid>=? (make-uuid) (make-uuid)) #t) (test/eqv "V1" (not (make-uuid 'V1)) #f) (test/eqv "V1-MC" (not (make-uuid 'V1-MC)) #f) (test/eqv "V3" (not (make-uuid 'V3 "ns:URL" "foobarbaz")) #f) (test/eqv "V4" (not (make-uuid 'V4)) #f) (test/eqv "V5" (not (make-uuid 'V5 "ns:X500" "foobarbaz")) #f) (test/eqv "Export" (let ((tuuid (make-uuid 'V3 "ns:URL" "foobarbaz"))) (not (uuid-export tuuid))) #f) (test/eqv "Export binary" (let ((tuuid (make-uuid 'V3 "ns:URL" "foobarbaz"))) (not (uuid-export-binary tuuid))) #f) (test/eqv "Export text" (let ((tuuid (make-uuid 'V3 "ns:URL" "foobarbaz"))) (not (uuid-export-text tuuid))) #f) (test/eqv "Import" (let ((tuuid (make-uuid 'V3 "ns:URL" "foobarbaz"))) (not (uuid=? tuuid (uuid-import (uuid-export tuuid))))) #f) (test/eqv "Import binary" (let ((tuuid (make-uuid 'V3 "ns:URL" "foobarbaz"))) (not (uuid=? tuuid (uuid-import-binary (uuid-export-binary tuuid))))) #f) (test/eqv "uuid-version is number" (not (number? (uuid-version))) #f) (test/equal "Error(1)" (condition-case (make-uuid 'V3 "ns:URL" "foobarbaz" 1 2) (v () ((condition-property-accessor 'exn 'message) v))) "invalid or missing namespace and name") (test/equal "Error(2)" (condition-case (make-uuid 'R27) (v () ((condition-property-accessor 'exn 'message) v))) "invalid mode") (test/equal "Error(3)" (condition-case (uuid-load "foobar") (v () ((condition-property-accessor 'exn 'message) v))) "invalid argument") )