Menu

#423 snit test failures

closed-fixed
snit (26)
5
2004-07-27
2004-02-17
Don Porter
No

In the tcllib 1.6 release,
with Tcl/Tk 8.4.6 on Solaris 9:

- snit 0.93

==== install-2.2 Delegate option * for a shadowed
option. Foreground is declared
as a non-delegated option, hence it will pick up
the option database
default. -foreground is not included in the
"delegate option *", so
the text widget's -foreground option will not be
set from the
option database. FAILED
==== Contents of test case:

cleanup

widget myframe {
option -foreground white
delegate option * to text

typeconstructor {
option add *Myframe.foreground red
}

constructor {args} {
install text using text $win.text
}

method getit {} {
$text cget -foreground
}
}

myframe .frm
set a [.frm cget -foreground]
set b [.frm getit]
destroy .frm
tkbide

list $a $b

---- Result was:
red #000000000000
---- Result should have been (exact matching):
red Black
==== install-2.2 FAILED

==== widgetclass-1.6 implicit widgetclass applied to
hull FAILED
==== Contents of test case:

cleanup

widget dog {
typeconstructor {
option add *Dog.background green widgetDefault
}

method background {} {
$hull cget -background
}
}

dog .dog

set bg [.dog background]

destroy .dog

set bg

---- Result was:
#FF00D6009000
---- Result should have been (exact matching):
green
==== widgetclass-1.6 FAILED

==== widgetclass-1.7 explicit widgetclass applied to
hull FAILED
==== Contents of test case:

cleanup

widget dog {
widgetclass DogWidget

typeconstructor {
option add *DogWidget.background green
widgetDefault
}

method background {} {
$hull cget -background
}
}

dog .dog

set bg [.dog background]

destroy .dog

set bg

---- Result was:
#FF00D6009000
---- Result should have been (exact matching):
green
==== widgetclass-1.7 FAILED

Discussion

  • Don Porter

    Don Porter - 2004-02-18

    Logged In: YES
    user_id=80530

    Will suggests these failures
    may trace back to some
    problems in Tk 8.4.6. Can
    someone familiar
    with the snit internals construct
    a script of Tk commands that
    exhibits similar behavior?

     
  • Will Duquette

    Will Duquette - 2004-02-19

    Logged In: YES
    user_id=372859

    Thinking about it a bit more, I expect this is a problem with the
    option database. The above tests set something like
    "*Dog.background" to "green" using "option add", and then creates
    a widget with widgetclass Dog. When the option is retrieved it
    comes out as a hex string, instead of "green".

     
  • Don Porter

    Don Porter - 2004-02-20

    Logged In: YES
    user_id=80530

    This test is failing only on a
    window manager system (CDE 1.5)
    where there are some X options
    in place. The priority in these
    tests are "widgetDefault" which
    is too low to overcome the
    system options.

     
  • Will Duquette

    Will Duquette - 2004-02-21

    Logged In: YES
    user_id=372859

    Aha!

    OK, that's definitely a bug in the test suite. Thanks for tracking it
    down!

    I'll fix it.

     
  • Will Duquette

    Will Duquette - 2004-07-27
    • status: open --> closed-fixed