1 | # Commands covered: |
---|
2 | # Rappture::Gauge |
---|
3 | # Rappture::Gauge::value |
---|
4 | # |
---|
5 | # This file contains a collection of tests for one of the Rappture Tcl |
---|
6 | # commands. Sourcing this file into Tcl runs the tests and |
---|
7 | # generates output for errors. No output means no errors were found. |
---|
8 | # |
---|
9 | # ====================================================================== |
---|
10 | # AUTHOR: Derrick Kearney, Purdue University |
---|
11 | # Copyright (c) 2004-2012 HUBzero Foundation, LLC |
---|
12 | # |
---|
13 | # See the file "license.terms" for information on usage and redistribution |
---|
14 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
15 | |
---|
16 | |
---|
17 | if {[lsearch [namespace children] ::tcltest] == -1} { |
---|
18 | package require tcltest |
---|
19 | package require RapptureGUI |
---|
20 | namespace import -force ::tcltest::* |
---|
21 | } |
---|
22 | |
---|
23 | set servers [Rappture::VisViewer::GetServerList "vtkvis"] |
---|
24 | |
---|
25 | Rappture::VtkIsosurfaceViewer .#auto $servers |
---|
26 | |
---|
27 | #---------------------------------------------------------- |
---|
28 | #---------------------------------------------------------- |
---|
29 | # constructor |
---|
30 | # |
---|
31 | # Rappture::VtkIsosurfaceViewer <name> <servers> |
---|
32 | #---------------------------------------------------------- |
---|
33 | test vtkisosurfaceviewer.constructor.1 { |
---|
34 | value command, 0 args, missing server list error |
---|
35 | } -setup { |
---|
36 | } -body { |
---|
37 | list [catch {Rappture::VtkIsosurfaceViewer .#auto} msg] $msg |
---|
38 | } -cleanup { |
---|
39 | } -result {1 {wrong # args: should be "::Rappture::VtkIsosurfaceViewer .vtkIsosurfaceViewer1 hostlist ?arg arg ...?"}} |
---|
40 | |
---|
41 | test vtkisosurfaceviewer.constructor.2 { |
---|
42 | value command, 1 args empty hostlist, empty hostlist uses visviewer defaults |
---|
43 | } -setup { |
---|
44 | } -body { |
---|
45 | catch {Rappture::VtkIsosurfaceViewer .#auto {}} msg |
---|
46 | } -cleanup { |
---|
47 | } -result {0} |
---|
48 | |
---|
49 | test vtkisosurfaceviewer.constructor.3 { |
---|
50 | value command, 1 args valid hostlist |
---|
51 | } -setup { |
---|
52 | } -body { |
---|
53 | catch {Rappture::VtkIsosurfaceViewer .#auto $servers} msg |
---|
54 | } -cleanup { |
---|
55 | } -result {0} |
---|
56 | |
---|
57 | #test vtkisosurfaceviewer.constructor.5 { |
---|
58 | # value command, 1 args valid hostlist |
---|
59 | #} -setup { |
---|
60 | #} -body { |
---|
61 | # set w [Rappture::VtkIsosurfaceViewer .#auto $servers] |
---|
62 | #} -cleanup { |
---|
63 | # destroy $w |
---|
64 | # catch {unset w} |
---|
65 | #} -result {} |
---|
66 | |
---|
67 | ::tcltest::cleanupTests |
---|
68 | return |
---|