Debian Codegraph @

packages/seacas/libraries/ioss/src/visualization/catalyst/test/parser/ImageSetInvalidTests.cxx

raw
1 // Copyright(C) 1999-2021 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6
7 #include "CatalystTestFixture.h"
8 #include "catch.hpp"
9
10 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidCamera", "[imageSetInvalid]")
11 {
12
13 std::string ps = R"(
14 begin catalyst
15 begin imageset foo
16 camera = doesntexist
17 end imageset
18 )";
19
20 checkPhactoriStringInvalidParse(ps);
21 }
22
23 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidRepresentation", "[imageSetInvalid]")
24 {
25
26 std::string ps = R"(
27 begin catalyst
28 begin imageset foo
29 representation = doesntexist
30 end imageset
31 end
32 )";
33
34 checkPhactoriStringInvalidParse(ps);
35 }
36
37 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidOperation", "[imageSetInvalid]")
38 {
39
40 std::string ps = R"(
41 begin catalyst
42 begin imageset foo
43 operation = doesntexist
44 end imageset
45 end
46 )";
47
48 checkPhactoriStringInvalidParse(ps);
49 }
50
51 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidImageBasename", "[notWorking]")
52 {
53
54 std::string ps = R"(
55 begin catalyst
56 begin imageset foo
57 image basename = "$%/name"
58 end imageset
59 end
60 )";
61
62 checkPhactoriStringInvalidParse(ps);
63 }
64
65 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidBaseDirectory", "[notWorking]")
66 {
67
68 std::string ps = R"(
69 begin catalyst
70 begin imageset foo
71 image base directory = "$%/name"
72 end imageset
73 end
74 )";
75
76 checkPhactoriStringInvalidParse(ps);
77 }
78
79 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidBaseDirectory2", "[notWorking]")
80 {
81
82 std::string ps = R"(
83 begin catalyst
84 begin imageset foo
85 image base directory = "/"
86 end imageset
87 end
88 )";
89
90 checkPhactoriStringInvalidParse(ps);
91 }
92
93 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidBaseDirectory3", "[notWorking]")
94 {
95
96 std::string ps = R"(
97 begin catalyst
98 begin imageset foo
99 image base directory = "/foo"
100 end imageset
101 end
102 )";
103
104 checkPhactoriStringInvalidParse(ps);
105 }
106
107 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetTwoImageFormats", "[notWorking]")
108 {
109
110 std::string ps = R"(
111 begin catalyst
112 begin imageset foo
113 image format = jpg
114 image format = png
115 end imageset
116 end
117 )";
118
119 checkPhactoriStringInvalidParse(ps);
120 }
121
122 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidImageFormat", "[imageSetInvalid]")
123 {
124
125 std::string ps = R"(
126 begin catalyst
127 begin imageset foo
128 image format = foo
129 end imageset
130 end
131 )";
132
133 checkPhactoriStringInvalidParse(ps);
134 }
135
136 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidImageSize1", "[imageSetInvalid]")
137 {
138
139 std::string ps = R"(
140 begin catalyst
141 begin imageset foo
142 image size = 10000000 10000000
143 end imageset
144 end
145 )";
146
147 checkPhactoriStringInvalidParse(ps);
148 }
149
150 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidImageSize2", "[imageSetInvalid]")
151 {
152
153 std::string ps = R"(
154 begin catalyst
155 begin imageset foo
156 image size = 1000 0
157 end imageset
158 end
159 )";
160
161 checkPhactoriStringInvalidParse(ps);
162 }
163
164 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidOperationShortcut", "[imageSetInvalid]")
165 {
166
167 std::string ps = R"(
168 begin catalyst
169 begin clip clipNone
170 relative point on plane = -0.5 0 0
171 plane normal = 1 0 0
172 side to keep = positive
173 end operation
174 begin imageset foo
175 slice = point 1 2 3 normal 4 5 6
176 operation = clipNone
177 end imageset
178 end
179 )";
180
181 checkPhactoriStringInvalidParse(ps);
182 }
183
184 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidCameraShortcut", "[imageSetInvalid]")
185 {
186
187 std::string ps = R"(
188 begin catalyst
189 begin camera fooCamera
190 end camera
191 begin imageset foo
192 look at absolute point = 1 2 3
193 camera = fooCamera
194 end imageset
195 end
196 )";
197
198 checkPhactoriStringInvalidParse(ps);
199 }
200
201 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidRepresentationShortcut", "[imageSetInvalid]")
202 {
203
204 std::string ps = R"(
205 begin catalyst
206 begin representation fooRep
207 end representation
208 begin imageset foo
209 representation = fooRep
210 color by scalar = mass
211 end imageset
212 end
213 )";
214
215 checkPhactoriStringInvalidParse(ps);
216 }
217
218 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidCameraLookDirection", "[imageSetInvalid]")
219 {
220
221 std::string ps = R"(
222 begin catalyst
223 begin imageset fooImageset
224 look direction = 1 2 3
225 end imageset
226 end
227 )";
228
229 checkPhactoriStringInvalidParse(ps);
230 }
231
232 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidCameraShortcut1", "[imageSetInvalid]")
233 {
234
235 std::string ps = R"(
236 begin catalyst
237 begin imageset fooImageset
238 camera at absolute point = 0 0 0
239 end imageset
240 end
241 )";
242
243 checkPhactoriStringInvalidParse(ps);
244 }
245
246 TEST_CASE_METHOD(CatalystTestFixture, "ImagesetInvalidCameraShortcut2", "[imageSetInvalid]")
247 {
248
249 std::string ps = R"(
250 begin catalyst
251 begin imageset fooImageset
252 image name addon = foo
253 end imageset
254 end
255 )";
256
257 checkPhactoriStringInvalidParse(ps);
258 }