Changeset 2034 for trunk/tester/testview.tcl
- Timestamp:
- Jan 14, 2011 2:34:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tester/testview.tcl
r2032 r2034 30 30 inherit itk::Widget 31 31 32 public variable test32 itk_option define -test test Test "" 33 33 34 34 constructor {args} { #defined later } … … 105 105 # ---------------------------------------------------------------------- 106 106 itcl::configbody Rappture::Tester::TestView::test { 107 set test $itk_option(-test) 107 108 # Data array is empty for branch nodes. 108 109 if {$test != ""} { … … 116 117 Error {showStatus "Error while running test."} 117 118 } 118 updateInfo $test119 119 } else { 120 120 showStatus "Test has not yet ran." 121 updateInfo122 }123 update Results $test124 updateInputs $test121 } 122 updateResults 123 updateInfo 124 updateInputs 125 125 set descr [[$test getTestobj] get test.description] 126 126 if {$descr == ""} { … … 180 180 181 181 # ---------------------------------------------------------------------- 182 # USAGE: updateResults ?test? 183 # 184 # Clears the analyzer and loads the given library objects. Used to load 185 # both the golden result as well as the test result. Clears the 186 # analyzer space if no arguments are given. 187 # ---------------------------------------------------------------------- 188 itcl::body Rappture::Tester::TestView::updateResults {args} { 182 # USAGE: updateResults 183 # ---------------------------------------------------------------------- 184 itcl::body Rappture::Tester::TestView::updateResults {} { 189 185 $itk_component(results) clear -nodelete 190 if {[llength $args] == 0} { 186 set test $itk_option(-test) 187 if {$test == ""} { 191 188 # Already cleared, do nothing. 192 189 # TODO: Eventually display some kinds of message here. 193 } elseif {[llength $args] == 1} { 190 } else { 191 set test $itk_option(-test) 194 192 $itk_component(results) load [$test getTestobj] 195 193 if {[$test hasRan]} { … … 197 195 } 198 196 } 199 200 } 201 202 # ---------------------------------------------------------------------- 203 # USAGE: updateInfo ?test? 204 # 205 # Given a set of key value pairs from the test tree, update the info 206 # page of the testview widget. If no arguments are given, disable the 207 # info page. 208 # ---------------------------------------------------------------------- 209 itcl::body Rappture::Tester::TestView::updateInfo {args} { 210 if {[llength $args] == 0} { 197 } 198 199 # ---------------------------------------------------------------------- 200 # USAGE: updateInfo 201 # ---------------------------------------------------------------------- 202 itcl::body Rappture::Tester::TestView::updateInfo {} { 203 set test $itk_option(-test) 204 if {$test == "" || ![$test hasRan]} { 211 205 $itk_component(info) delete 0.0 end 212 206 set index [$itk_component(tabs) index -name "Results"] … … 214 208 $itk_component(tabs) focus $index 215 209 $itk_component(tabs) tab configure "Info" -state disabled 216 } elseif {[llength $args] == 1} { 210 } else { 211 set test $itk_option(-test) 217 212 set testxml [$test getTestxml] 218 213 set runfile [$test getRunfile] … … 229 224 $itk_component(info) insert end "Added: $added\n" 230 225 } 231 } else { 232 error "wrong # args: should be \"updateInfo ?test?\"" 233 } 234 } 235 236 itcl::body Rappture::Tester::TestView::updateInputs {args} { 237 if {[llength $args] == 0} { 226 } 227 } 228 229 itcl::body Rappture::Tester::TestView::updateInputs {} { 230 set test $itk_option(-test) 231 if {$test == ""} { 238 232 set index [$itk_component(tabs) index -name "Results"] 239 233 $itk_component(tabs) select $index 240 234 $itk_component(tabs) focus $index 241 235 $itk_component(tabs) tab configure "Inputs" -state disabled 242 } elseif {[llength $args] == 1} { 236 } else { 237 set test $itk_option(-test) 243 238 $itk_component(tabs) tab configure "Inputs" -state normal 244 } else { 245 error "wrong # args: should be \"updateInfo ?test?\"" 246 } 247 } 248 239 } 240 } 241
Note: See TracChangeset
for help on using the changeset viewer.