1 | # Commands covered: |
---|
2 | # Rappture::VtkIsosurfaceViewer |
---|
3 | # |
---|
4 | # This file contains a collection of tests for one of the Rappture Tcl |
---|
5 | # commands. Sourcing this file into Tcl runs the tests and |
---|
6 | # generates output for errors. No output means no errors were found. |
---|
7 | # |
---|
8 | # ====================================================================== |
---|
9 | # AUTHORS: |
---|
10 | # Derrick Kearney, Purdue University |
---|
11 | # Leif Delgass, Purdue University |
---|
12 | # Copyright (c) 2004-2016 HUBzero Foundation, LLC |
---|
13 | # |
---|
14 | # See the file "license.terms" for information on usage and redistribution |
---|
15 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
16 | |
---|
17 | |
---|
18 | if {[lsearch [namespace children] ::tcltest] == -1} { |
---|
19 | package require tcltest |
---|
20 | package require Rappture |
---|
21 | package require RapptureGUI |
---|
22 | namespace import -force ::tcltest::* |
---|
23 | } |
---|
24 | |
---|
25 | #---------------------------------------------------------- |
---|
26 | #---------------------------------------------------------- |
---|
27 | # constructor |
---|
28 | # |
---|
29 | # Rappture::VtkIsosurfaceViewer <name> <servers> |
---|
30 | #---------------------------------------------------------- |
---|
31 | test vtkisosurfaceviewer.constructor.1 { |
---|
32 | constructor, 0 args, auto named |
---|
33 | } -setup { |
---|
34 | } -body { |
---|
35 | list [catch {Rappture::VtkIsosurfaceViewer .#auto} msg] $msg |
---|
36 | } -cleanup { |
---|
37 | destroy .vtkIsosurfaceViewer0 |
---|
38 | } -result {0 .vtkIsosurfaceViewer0} |
---|
39 | |
---|
40 | test vtkisosurfaceviewer.constructor.2 { |
---|
41 | value command, explicit name, -plotbackground option |
---|
42 | } -setup { |
---|
43 | } -body { |
---|
44 | catch {Rappture::VtkIsosurfaceViewer .foo -plotbackground red} msg |
---|
45 | } -cleanup { |
---|
46 | destroy .foo |
---|
47 | } -result {0} |
---|
48 | |
---|
49 | test vtkisosurfaceviewer.constructor.3 { |
---|
50 | value command, bad option |
---|
51 | } -setup { |
---|
52 | } -body { |
---|
53 | list [catch {Rappture::VtkIsosurfaceViewer .foo -nonexistent foo} msg] $msg |
---|
54 | } -cleanup { |
---|
55 | destroy .foo |
---|
56 | } -result {1 {unknown option "-nonexistent"}} |
---|
57 | |
---|
58 | ::tcltest::cleanupTests |
---|
59 | return |
---|