URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
# This file is a Tcl script to test out all of the "usual" options
|
2 |
|
|
# for all of the [incr Widgets]. It looks for other tests in this
|
3 |
|
|
# directory, and tries to create a mega-widget with each of these
|
4 |
|
|
# as a component. If there are any problems with "usual" definitions,
|
5 |
|
|
# they will be found here.
|
6 |
|
|
#
|
7 |
|
|
# See the file "license.terms" for information on usage and redistribution
|
8 |
|
|
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
9 |
|
|
#
|
10 |
|
|
# @(#) $Id: usual.test,v 1.1.1.1 2002-01-16 10:24:51 markom Exp $
|
11 |
|
|
|
12 |
|
|
package require Iwidgets 3.0
|
13 |
|
|
|
14 |
|
|
if {[string compare test [info procs test]] == 1} {
|
15 |
|
|
source defs
|
16 |
|
|
}
|
17 |
|
|
|
18 |
|
|
wm geometry . {}
|
19 |
|
|
raise .
|
20 |
|
|
|
21 |
|
|
# ----------------------------------------------------------------------
|
22 |
|
|
# Create a new mega-widget class that we can use to add other
|
23 |
|
|
# classes as components.
|
24 |
|
|
# ----------------------------------------------------------------------
|
25 |
|
|
test usual-1.1 {create a mega-widget that we can add components to} {
|
26 |
|
|
itcl::class TestUsual {
|
27 |
|
|
inherit itk::Widget
|
28 |
|
|
method do {cmd} {
|
29 |
|
|
eval $cmd
|
30 |
|
|
}
|
31 |
|
|
}
|
32 |
|
|
TestUsual .testUsual
|
33 |
|
|
} {.testUsual}
|
34 |
|
|
|
35 |
|
|
# ----------------------------------------------------------------------
|
36 |
|
|
# Now, scan through all of the tests in this directory and look
|
37 |
|
|
# for mega-widgets. Add each mega-widget to the test class.
|
38 |
|
|
# ----------------------------------------------------------------------
|
39 |
|
|
set unique 0
|
40 |
|
|
foreach file [glob *.test] {
|
41 |
|
|
set widget [file rootname [file tail $file]]
|
42 |
|
|
|
43 |
|
|
if {$widget != "usual"} {
|
44 |
|
|
set name "c[incr unique]"
|
45 |
|
|
test usual-1.2.$name "verify \"usual\" options for $widget" {
|
46 |
|
|
.testUsual do [format {
|
47 |
|
|
itk_component add %s {
|
48 |
|
|
iwidgets::%s $itk_interior.%s
|
49 |
|
|
}
|
50 |
|
|
} $name $widget $name]
|
51 |
|
|
} $name
|
52 |
|
|
}
|
53 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.