source: trunk/abcl/test/lisp/abcl/bugs.lisp @ 12570

Last change on this file since 12570 was 12570, checked in by Mark Evenson, 13 years ago

Fix JAVA-OBJECT whose tynot being properly coerced to array of primitive types.

Fix proposed by Douglas Miles.

An array of primitive types which were first stuffed into a
type-erasing Java collection and then retrieved could not be used as
the original type.

Updated JAVA-OBJECT's getParts() protocol to return information about
what type the wrapped object thinks it should be.

Added test BUGS.JAVA.1 to test that this has been fixed.

File size: 3.0 KB
Line 
1(in-package :abcl.test.lisp)
2
3;;; When these bugs get fixed, they should be moved elsewhere in the
4;;; testsuite so they remain fixed.
5
6(deftest bugs.logical-pathname.1
7    #|
8Date: Mon, 18 Jan 2010 10:51:07 -0500
9Message-ID: <29af5e2d1001180751l7cf79a3ay929cef1deb9ed063@mail.gmail.com>
10Subject: Re: [armedbear-devel] translate-logical-pathname and :wild-inferiors
11regression
12From: Alan Ruttenberg <alanruttenberg@gmail.com>
13    |#
14    (progn
15      (setf (logical-pathname-translations "ido") 
16            '(("IDO:IDO-CORE;**;*.*" 
17               "/Users/alanr/repos/infectious-disease-ontology/trunk/src/ontology/ido-core/**/*.*") 
18              ("IDO:IMMUNOLOGY;**;*.*"
19               "/Users/alanr/repos/infectious-disease-ontology/trunk/src/ontology/immunology/**/*.*") 
20              ("IDO:TOOLS;**;*.*" 
21               "/Users/alanr/repos/infectious-disease-ontology/trunk/src/tools/**/*.*") 
22              ("IDO:LIB;**;*.*"
23               "/Users/alanr/repos/infectious-disease-ontology/trunk/lib/**/*.*")))
24      (translate-pathname "IDO:IMMUNOLOGY;" "IDO:IMMUNOLOGY;**;*.*" 
25                          "/Users/alanr/repos/infectious-disease-ontology/trunk/src/ontology/**/*.*"))
26  #P"/users/alanr/repos/infectious-disease-ontology/trunk/src/ontology/")
27
28(deftest bugs.logical.pathname.2
29    #|
30Message-Id: <BBE9D0E5-5166-4D24-9A8A-DC4E766976D1@ISI.EDU>
31From: Thomas Russ <tar@ISI.EDU>
32To: armedbear-devel@common-lisp.net
33Subject: [armedbear-devel] Bug in translate-logical-pathname.
34    |#
35    (progn 
36      (setf (logical-pathname-translations "L")
37            '(("L:NATIVE;**;*.*" "/usr/lisp/abcl/native/**/*.*")))
38      (translate-logical-pathname "L:NATIVE;TEST;FOO.FASL"))
39  #p"/usr/lisp/abcl/native/test/foo.fasl")
40
41     
42(deftest bugs.pathname.1
43    (namestring (make-pathname :directory '(:relative) :name "file" 
44                   :type :unspecific 
45                   :host nil :device nil))
46  "./file")
47
48(deftest bugs.pathname.2
49    (TRANSLATE-PATHNAME 
50     #P"/Users/evenson/work/bordeaux-threads/src/bordeaux-threads.abcl" 
51     #P"/**/**/*.*" 
52     #P"/Users/evenson/.cache/common-lisp/armedbear-0.20.0-dev-darwin-unknown/**/*.*")
53  #P"/Users/evenson/.cache/common-lisp/armedbear-0.20.0-dev-darwin-unknown/bordeaux-threads.abcl")
54
55(deftest bugs.pathname.3 
56    (namestring (MAKE-PATHNAME :HOST NIL :DEVICE NIL 
57                               :DIRECTORY '(:RELATIVE :WILD-INFERIORS) 
58                               :DEFAULTS "/**/"))
59  "**/")
60
61(deftest bugs.java.1
62    (let* ((a (java:jnew-array "byte" 1))
63           (b (let ((array-list (java:jnew (java:jconstructor
64                                       "java.util.ArrayList"))))
65                (java:jcall (java:jmethod "java.util.AbstractList" "add"
66                                          "java.lang.Object")
67                            array-list a)
68                (java:jcall (java:jmethod "java.util.AbstractList" "get" "int")
69                            array-list 0))))
70      (type-of (sys::%make-byte-array-input-stream b)))
71  stream)
72               
73                   
74                   
Note: See TracBrowser for help on using the repository browser.