URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [tests/] [disjointlistbox.test] - Rev 1780
Go to most recent revision | Compare with Previous | Blame | View Log
# This file is a Tcl script to test out [incr Widgets] Disjointlistbox class.
# It is organized in the standard fashion for Tcl tests with the following
# notation for test case labels:
#
# 1.x - Construction/Destruction tests
# 2.x - Configuration option tests
# 3.x - Method tests
#
# Copyright (c) 1995 DSC Technologies Corporation
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# @(#) $Id: disjointlistbox.test,v 1.1.1.1 2002-01-16 10:24:51 markom Exp $
package require Iwidgets 3.0
if {[string compare test [info procs test]] == 1} {
source defs
}
wm geometry . {}
raise .
set c 1
set o 1
set m 1
#
# Initial construction test
#
test Disjointlistbox-1.$c {Disjointlistbox construction} {
iwidgets::Disjointlistbox .lf
pack .lf -fill both -expand yes
update
} {}
incr c
#
# Option tests which are successful.
#
test Disjointlistbox-2.$o {configuration option} {
llength [.lf configure]
} {28}
incr o
foreach test {
{-lhslabeltext "LHS" "LHS"}
{-lhslabeltext "Available" "Available"}
{-lhslabeltext "Don't Print" "Don't Print"}
{-rhslabeltext "RHS" "RHS"}
{-rhslabeltext "Current" "Current"}
{-rhslabeltext "Print" "Print"}
{-buttonplacement bottom bottom}
{-buttonplacement center center}
} {
set option [lindex $test 0]
test Disjointlistbox-1.$o "configuration options, $option" {
.lf configure $option [lindex $test 1]
lindex [.lf configure $option] 4
} [lindex $test 2]
update
incr o
}
#
# Method tests which are successful.
#
test Disjointlistbox-1.$c {Disjointlistbox destruction} {
destroy .lf
update
} {}
incr c
test Disjointlistbox-1.$c {Disjointlistbox construction} {
iwidgets::disjointlistbox .lf -lhslabeltext "Don't Print" -rhslabeltext "Print"
pack .lf -fill both -expand yes
update
} {}
incr c
test Disjointlistbox-1.$c {Disjointlistbox destruction} {
destroy .lf
update
} {}
incr c
test Disjointlistbox-1.$c {Disjointlistbox construction} {
iwidgets::disjointlistbox .lf
pack .lf
destroy .lf
update
} {}
Go to most recent revision | Compare with Previous | Blame | View Log