OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [tests/] [disjointlistbox.test] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# This file is a Tcl script to test out [incr Widgets] Disjointlistbox class.
2
# It is organized in the standard fashion for Tcl tests with the following
3
# notation for test case labels:
4
#
5
#   1.x - Construction/Destruction tests
6
#   2.x - Configuration option tests
7
#   3.x - Method tests
8
#
9
# Copyright (c) 1995 DSC Technologies Corporation
10
#
11
# See the file "license.terms" for information on usage and redistribution
12
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13
#
14
# @(#) $Id: disjointlistbox.test,v 1.1.1.1 2002-01-16 10:24:51 markom Exp $
15
 
16
package require Iwidgets 3.0
17
 
18
if {[string compare test [info procs test]] == 1} {
19
    source defs
20
}
21
 
22
wm geometry . {}
23
raise .
24
 
25
set c 1
26
set o 1
27
set m 1
28
 
29
#
30
# Initial construction test
31
#
32
test Disjointlistbox-1.$c {Disjointlistbox construction} {
33
    iwidgets::Disjointlistbox .lf
34
    pack .lf -fill both -expand yes
35
    update
36
} {}
37
 
38
incr c
39
 
40
#
41
# Option tests which are successful.
42
#
43
test Disjointlistbox-2.$o {configuration option} {
44
    llength [.lf configure]
45
} {28}
46
 
47
incr o
48
 
49
foreach test {
50
    {-lhslabeltext "LHS" "LHS"}
51
    {-lhslabeltext "Available" "Available"}
52
    {-lhslabeltext "Don't Print" "Don't Print"}
53
    {-rhslabeltext "RHS" "RHS"}
54
    {-rhslabeltext "Current" "Current"}
55
    {-rhslabeltext "Print" "Print"}
56
    {-buttonplacement bottom bottom}
57
    {-buttonplacement center center}
58
    } {
59
        set option [lindex $test 0]
60
        test Disjointlistbox-1.$o "configuration options, $option" {
61
            .lf configure $option [lindex $test 1]
62
            lindex [.lf configure $option] 4
63
        } [lindex $test 2]
64
        update
65
        incr o
66
    }
67
 
68
#
69
# Method tests which are successful.
70
#
71
test Disjointlistbox-1.$c {Disjointlistbox destruction} {
72
    destroy .lf
73
    update
74
} {}
75
 
76
incr c
77
 
78
test Disjointlistbox-1.$c {Disjointlistbox construction} {
79
    iwidgets::disjointlistbox .lf -lhslabeltext "Don't Print" -rhslabeltext "Print"
80
    pack .lf -fill both -expand yes
81
    update
82
} {}
83
 
84
incr c
85
 
86
test Disjointlistbox-1.$c {Disjointlistbox destruction} {
87
    destroy .lf
88
    update
89
} {}
90
 
91
incr c
92
 
93
test Disjointlistbox-1.$c {Disjointlistbox construction} {
94
    iwidgets::disjointlistbox .lf
95
    pack .lf
96
    destroy .lf
97
    update
98
} {}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.