Artifact [9eb85b0465]
Not logged in

Artifact 9eb85b0465e58a8de35386443378e5c5784be9f2:


# JavaIsNullCmd.test --
#
#	Tests the JavaIsNullCmd class.
#
# Copyright (c) 1998 by Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# 2016 - reinserted in JBlend project

package require TTXN
  # package under test is JBlend 2.0
package require JBlend 2.0


Name: JavaIsNullCmd-1.1
Description: {cmdProc numArgs}
Test: {
    java::isnull
}
Expected: error {wrong # args: should be "java::isnull object"}

Name: JavaIsNullCmd-1.2
Description: {cmdProc numArgs}
Test: {
    java::isnull foo extra
}
Expected: error {wrong # args: should be "java::isnull object"}

Name: JavaIsNullCmd-2.1
Description: {cmdProc}
Test: {
    java::isnull [java::null]
}
Expected: 1

Name: JavaIsNullCmd-2.2
Description: {cmdProc}
Test: {
    java::isnull [java::new {java.lang.String java.lang.String} "foo"]
}
Expected: 0


Name: JavaIsNullCmd-2.3
Description: {cmdProc}
Test: {
    java::isnull "foo"
}
Expected: error {unknown java object "foo"}


Name: JavaIsNullCmd-2.4
Description: {cmdProc}
Test: {
    java::isnull java0x00
}
Expected: error {unknown java object "java0x00"}

# === cleanup ========================================

::tcltest::cleanupTests
return