Changeset 10226


Ignore:
Timestamp:
10/25/05 14:43:49 (16 years ago)
Author:
piso
Message:

Added tests for JCLASS-OF.

File:
1 edited

Legend:

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

    r10213 r10226  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: java-tests.lisp,v 1.3 2005-10-24 12:47:35 piso Exp $
     4;;; $Id: java-tests.lisp,v 1.4 2005-10-25 14:43:49 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    7373  "java.lang.Object")
    7474
     75(deftest jclass-of.1
     76  (jclass-of "foo")
     77  "java.lang.String"
     78  "java.lang.String")
     79
     80(deftest jclass-of.2
     81  (jclass-of "foo" "java.lang.String")
     82  t
     83  "java.lang.String")
     84
     85(deftest jclass-of.3
     86  (jclass-of "foo" "bar")
     87  nil
     88  "java.lang.String")
     89
     90(deftest jclass-of.4
     91  (jclass-of 42)
     92  nil
     93  nil)
     94
     95(deftest jclass-of.5
     96  (jclass-of 'foo)
     97  nil
     98  nil)
     99
    75100(deftest jcall.1
    76101  (let ((method (jmethod "java.lang.String" "length")))
     
    92117  t)
    93118
     119#-abcl
     120(deftest jnew.1
     121  (jclass-of (jnew "java.awt.Point") "java.awt.Point")
     122  t
     123  "java.awt.Point")
     124
    94125(deftest jfield.1
    95126  (type-of (jfield "java.lang.Integer" "TYPE"))
Note: See TracChangeset for help on using the changeset viewer.