Last change
on this file was
15119,
checked in by Mark Evenson, 7 years ago
|
Cleanup prove tests
Remove use of test package, favoring use of CL-USER.
|
File size:
1.2 KB
|
Line | |
---|
1 | (in-package :cl-user) |
---|
2 | |
---|
3 | (prove:plan 5) |
---|
4 | (let ((set (list 2 3 5 7 11))) |
---|
5 | |
---|
6 | (prove:is-type (jss:to-hashset set) |
---|
7 | 'java:java-object |
---|
8 | "Checking whether JSS:TO-HASHSET produces a Java objectâŠ") |
---|
9 | (let ((result 0)) |
---|
10 | (jss:jmap (lambda (x) |
---|
11 | (incf result)) |
---|
12 | (java:jnew-array "java.lang.Integer" 10)) |
---|
13 | (prove:is result 10 "Checking JSS:JMAP on Java array of java.lang.IntegerâŠ")) |
---|
14 | (prove:ok (jss:j2list (java:jnew-array "java.lang.Integer" 10)) |
---|
15 | "Checking JSS:J2LIST on Java array of java.langIntegerâŠ") |
---|
16 | (prove:is (let (list) |
---|
17 | (jss:jmap (lambda (x) (push x list)) |
---|
18 | (let ((jarray (java:jnew-array "int" 3))) |
---|
19 | (jarray-set jarray 1 1) |
---|
20 | (jarray-set jarray 2 2) |
---|
21 | jarray)) |
---|
22 | (nreverse list)) |
---|
23 | '(0 1 2) |
---|
24 | "Checking JSS:JMAP on Java array of intâŠ") |
---|
25 | (prove:is (jss:j2list (let ((jarray (java:jnew-array "int" 3))) |
---|
26 | (jarray-set jarray 1 1) |
---|
27 | (jarray-set jarray 2 2) |
---|
28 | jarray)) |
---|
29 | '(0 1 2) |
---|
30 | "Checking JSS:J2LIST on Java array of intâŠ")) |
---|
31 | |
---|
32 | (prove:finalize) |
---|
33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.