Changeset 10250


Ignore:
Timestamp:
10/28/05 00:11:58 (16 years ago)
Author:
piso
Message:

JMETHOD, JMETHOD-RETURN-TYPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/tests/java-tests.lisp

    r10244 r10250  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: java-tests.lisp,v 1.8 2005-10-27 18:56:36 piso Exp $
     4;;; $Id: java-tests.lisp,v 1.9 2005-10-28 00:11:58 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    192192  #+allegro tran-struct)
    193193
     194(deftest jmethod.1
     195  (jcall (jmethod "java.lang.Object" "toString")
     196         (jmethod "java.lang.String" "substring" 1))
     197  "public java.lang.String java.lang.String.substring(int)")
     198
     199(deftest jmethod.2
     200  (jcall (jmethod "java.lang.Object" "toString")
     201         (jmethod "java.lang.String" "substring" 2))
     202  "public java.lang.String java.lang.String.substring(int,int)")
     203
     204(deftest jmethod.3
     205  (signals-error (jmethod "java.lang.String" "substring" 3) 'error)
     206  t)
     207
     208#+abcl
     209(deftest jmethod-return-type.1
     210  (jclass-name (jmethod-return-type (jmethod "java.lang.String" "length")))
     211  "int")
     212
     213#+abcl
     214(deftest jmethod-return-type.2
     215  (jclass-name (jmethod-return-type (jmethod "java.lang.String" "substring" 1)))
     216  "java.lang.String")
     217
     218#+abcl
     219(deftest jmethod-return-type.error.1
     220  (signals-error (jmethod-return-type (jclass "java.lang.String")) 'error)
     221  t)
     222
     223#+abcl
     224(deftest jmethod-return-type.error.2
     225  (signals-error (jmethod-return-type 42) 'error)
     226  t)
     227
    194228(do-tests)
    195229
Note: See TracChangeset for help on using the changeset viewer.