jss-3.4.0: mark JSS:TO-HASHSET as part of API

Export JSS:TO-HASHSET as a symbol, test that exported symbol, and
document that symbol.
parent 5a9e6275
......@@ -143,6 +143,7 @@ iterators or a Java array."
(error "yet another iteration type - fix it: ~a" (jclass-name (jobject-class thing))))))))
(defun to-hashset (list)
"Convert LIST to the java.util.HashSet contract"
(let ((set (new 'hashset)))
(loop for l in list do (#"add" set l))
set))
......@@ -6,6 +6,7 @@
prove)
:components ((:module tests
:pathname "t"
:components ((:test-file "jss-tests"))))
:components ((:test-file "jss-tests")
(:test-file "collections"))))
:perform (asdf:test-op (op c)
(uiop:symbol-call :prove-asdf 'run-test-system c)))
......@@ -2,7 +2,7 @@
(defsystem jss
:author "Alan Ruttenberg, Mark Evenson"
:long-description "<urn:abcl.org/release/1.6.0/contrib/jss#>"
:version "3.3.0"
:version "3.4.0"
:components ((:module base :pathname "" :serial t
:components ((:file "packages")
(:file "invoke")
......
......@@ -26,6 +26,7 @@
#:set-to-list
#:vector-to-list
#:jarray-to-list
#:to-hashset
#:j2list
......
(in-package :cl-user)
(let ((set (list '(2 3 5 7 11))))
(prove:plan 1)
(prove:is-type (jss:to-hashset set)
'java:java-object
"Checking whether JSS:TO-HASHSET produces a Java object…"))
(prove:finalize)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment