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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [tests/] [tlist/] [TList.tcl] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# This tests the TList widget.
2
#
3
#
4
# Assumptions:
5
#       None
6
#
7
proc About {} {
8
    return "Basic tests for the TList widget"
9
}
10
 
11
proc Test {} {
12
 
13
    #
14
    # Test the creation
15
    #
16
    test {tixTList} {args}
17
    test {tixTList .t -ff} {unknown}
18
    test {tixTList .t -width} {missing}
19
 
20
    if {[info command .t] != {}} {
21
        error "widget not destroyed when creation failed"
22
    }
23
 
24
    set t [tixTList .t]
25
    test {$t} {args}
26
 
27
    #
28
    # Test the "insert" command
29
    #
30
    test {$t insert} {args}
31
    test {$t insert 0 -foo} {missing}
32
    test {$t insert 0 -foo bar} {unknown}
33
    test {$t insert 0 -itemtype foo} {unknown}
34
    test {$t insert 0 -itemtype text -image foo} {unknown}
35
    test {$t insert 0 -itemtype text -text Hello}
36
 
37
    pack $t
38
}

powered by: WebSVN 2.1.0

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