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 | Rappture::resources::load |
---|
26 | |
---|
27 | #---------------------------------------------------------- |
---|
28 | #---------------------------------------------------------- |
---|
29 | # constructor |
---|
30 | # |
---|
31 | # Rappture::VtkIsosurfaceViewer <name> <servers> |
---|
32 | #---------------------------------------------------------- |
---|
33 | test vtkisosurfaceviewer.constructor.0 { |
---|
34 | constructor, 0 args, auto named |
---|
35 | } -setup { |
---|
36 | } -body { |
---|
37 | Rappture::VtkIsosurfaceViewer .#auto |
---|
38 | } -cleanup { |
---|
39 | } -match glob \ |
---|
40 | -result {.vtkIsosurfaceViewer*} \ |
---|
41 | -errorOutput {connecting to *:2010... |
---|
42 | Render server is VtkVis * (build *) |
---|
43 | } |
---|
44 | |
---|
45 | test vtkisosurfaceviewer.constructor.1 { |
---|
46 | constructor, 0 args, explicit name |
---|
47 | } -setup { |
---|
48 | } -body { |
---|
49 | Rappture::VtkIsosurfaceViewer .foo |
---|
50 | } -cleanup { |
---|
51 | } -match glob \ |
---|
52 | -result {.foo} \ |
---|
53 | -errorOutput {connecting to *:2010... |
---|
54 | Render server is VtkVis * (build *) |
---|
55 | } |
---|
56 | |
---|
57 | test vtkisosurfaceviewer.constructor.2 { |
---|
58 | value command, auto name, -plotbackground option |
---|
59 | } -setup { |
---|
60 | } -body { |
---|
61 | Rappture::VtkIsosurfaceViewer .#auto -plotbackground red |
---|
62 | } -cleanup { |
---|
63 | } -match glob \ |
---|
64 | -result {.vtkIsosurfaceViewer*} \ |
---|
65 | -errorOutput {connecting to *:2010... |
---|
66 | Render server is VtkVis * (build *) |
---|
67 | } |
---|
68 | |
---|
69 | test vtkisosurfaceviewer.constructor.3 { |
---|
70 | value command, bad option |
---|
71 | } -setup { |
---|
72 | } -body { |
---|
73 | Rappture::VtkIsosurfaceViewer .#auto -nonexistent foo |
---|
74 | } -cleanup { |
---|
75 | } -returnCodes { |
---|
76 | error |
---|
77 | } -result {unknown option "-nonexistent"} |
---|
78 | |
---|
79 | ::tcltest::cleanupTests |
---|
80 | return |
---|