jss: fix JSS tests

The goal of executing the tests in CL-USER is to encode information
about the JSS API via exported symbols from that package, so we adjust
the tests to explicitly reference the JSS external symbols where
possible.  "internal" package access in the test infrastructure
denotes a test of implementation that hasn't been made official by
virtue of the status of the exporting symbol.  Since ABCL doesn't
allow DEFPACKAGE to redefine packages, one often initially creates
tests that call unexported JSS symbols.

One test still failing with

  × Raised an error Illegal function object: (SUBSTRING substring). (expected: "234")
parent 788e1edc
......@@ -4,13 +4,13 @@
(read-from-string "#\"{bar}.{foo}\"")
'(get-java-field bar foo t))
'(jss:get-java-field bar foo t))
(read-from-string "#\"q.bar.{foo}\"")
'(get-java-field (load-time-value (find-java-class "q.bar")) foo t))
'(jss:get-java-field (load-time-value (jss:find-java-class "q.bar")) foo t))
(read-from-string "#\"{bar}.foo\"")
'(get-java-field bar "foo" t))
'(jss:get-java-field bar "foo" t))
(read-from-string "#\".bar.foo\"")
......@@ -20,17 +20,17 @@
(substring "01234" 2)) "234")
;;; http://abcl.org/trac/ticket/229 - note: version of test for this ticket was broken in tests.lisp
(prove:is (#"toString"
(find "size" (#"getMethods" (find-java-class "java.util.Collections$UnmodifiableMap"))
(find "size" (#"getMethods" (jss:find-java-class "java.util.Collections$UnmodifiableMap"))
:test 'string-equal :key #"getName"))
(#"toString" (java::jmethod "java.util.Collections$UnmodifiableMap" "size" )))
(jss::with-class-lookup-disambiguated (lang.object) (find-java-class 'object))
(find-java-class 'java.lang.object))
(jss::with-class-lookup-disambiguated (lang.object) (jss:find-java-class 'object))
(jss:find-java-class 'java.lang.object))
;; Object is ambiguous in default java
(find-java-class 'object)
(jss:find-java-class 'object)
;; test that optimized jss is much faster than unoptimized
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 to comment