Changeset 6069


Ignore:
Timestamp:
Feb 27, 2016 9:17:45 PM (8 years ago)
Author:
ldelgass
Message:

Fix for gauge test: -check flag requires a new value argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/test/gauge.test

    r5687 r6069  
    6161} -result {4}
    6262
    63 test gauge.value.4 {value command, just -check flag, value is returned} \
     63test gauge.value.4 {value command, just -check flag, error is returned} \
    6464-setup {
    6565    set w [Rappture::Gauge .#auto]
     
    6969    destroy $w
    7070    catch {unset w}
    71 } -result {0}
     71} -returnCodes {
     72    error
     73} -result {wrong # args: should be "value ?-check? ?newval?"}
    7274
    73 test gauge.value.5 {value command, invalid flag, return error} \
     75test gauge.value.5 {value command, -check flag, orig value is unchanged} \
     76-setup {
     77    set w [Rappture::Gauge .#auto]
     78    $w value 2
     79} -body  {
     80    $w value -check 4
     81    $w value
     82} -cleanup {
     83    destroy $w
     84    catch {unset w}
     85} -result {2}
     86
     87test gauge.value.6 {value command, invalid flag, return error} \
    7488-setup {
    7589    set w [Rappture::Gauge .#auto]
    7690} -body  {
    77     list [catch {$w value -chcek} msg] $msg
     91    $w value -chcek
    7892} -cleanup {
    7993    destroy $w
    8094    catch {unset w}
    81 } -result {1 {bad value "-chcek": should be a real number}}
     95} -returnCodes {
     96    error
     97} -result {bad value "-chcek": should be a real number}
    8298
    8399::tcltest::cleanupTests
Note: See TracChangeset for help on using the changeset viewer.