2424import java .io .StringWriter ;
2525import java .io .Writer ;
2626
27+ import static junit .framework .Assert .assertNotNull ;
2728import static junit .framework .TestCase .assertEquals ;
2829import static org .bytedeco .javacpp .opencv_core .*;
2930
@@ -152,7 +153,7 @@ public void testPerformSerializedStep() throws Exception {
152153 serializeAndDeserialize ();
153154
154155
155- final Step fromPipeline = pipeline .getSteps ().get (0 );
156+ final Step fromPipeline = pipeline .getSteps ().get (0 );
156157 InputSocket <Number > a = (InputSocket <Number >) fromPipeline .getInputSockets ()[0 ];
157158 InputSocket <Number > b = (InputSocket <Number >) fromPipeline .getInputSockets ()[1 ];
158159 OutputSocket <Number > sum = (OutputSocket <Number >) fromPipeline .getOutputSockets ()[0 ];
@@ -171,7 +172,7 @@ public void testPerformSerializedPythonStepFromURL() throws Exception {
171172 pipeline .addStep (stepFactory .create (pythonAdditionOperationFromURL ));
172173 serializeAndDeserialize ();
173174
174- final Step fromPipeline = pipeline .getSteps ().get (0 );
175+ final Step fromPipeline = pipeline .getSteps ().get (0 );
175176 InputSocket <Number > a = (InputSocket <Number >) fromPipeline .getInputSockets ()[0 ];
176177 InputSocket <Number > b = (InputSocket <Number >) fromPipeline .getInputSockets ()[1 ];
177178 OutputSocket <Number > sum = (OutputSocket <Number >) fromPipeline .getOutputSockets ()[0 ];
@@ -191,7 +192,7 @@ public void testPerformSerializedPythonStepFromSource() throws Exception {
191192 pipeline .addStep (stepFactory .create (pythonAdditionOperationFromSource ));
192193 serializeAndDeserialize ();
193194
194- final Step fromPipeline = pipeline .getSteps ().get (0 );
195+ final Step fromPipeline = pipeline .getSteps ().get (0 );
195196 InputSocket <Number > a = (InputSocket <Number >) fromPipeline .getInputSockets ()[0 ];
196197 InputSocket <Number > b = (InputSocket <Number >) fromPipeline .getInputSockets ()[1 ];
197198 OutputSocket <Number > sum = (OutputSocket <Number >) fromPipeline .getOutputSockets ()[0 ];
@@ -228,7 +229,6 @@ public void testPerformSerializedPipeline() throws Exception {
228229 OutputSocket <Number > sum2 = (OutputSocket <Number >) step2Out .getOutputSockets ()[0 ];
229230
230231
231-
232232 a1 .setValue (123 );
233233 b1 .setValue (456 );
234234 b2 .setValue (789 );
@@ -250,7 +250,6 @@ public void testPerformSerializedPipelineWithMats() throws Exception {
250250 OutputSocket <Mat > sum = (OutputSocket <Mat >) step1 .getOutputSockets ()[0 ];
251251
252252
253-
254253 a .setValue (new Mat (1 , 1 , CV_32F , new Scalar (1234.5 )));
255254 b .setValue (new Mat (1 , 1 , CV_32F , new Scalar (6789.0 )));
256255
@@ -290,4 +289,18 @@ public void testSerializedProjectSettings() {
290289 assertEquals ("Deploy address was not serialized/deserialized" ,
291290 "roborio-191-frc.local" , pipeline .getProjectSettings ().getDeployAddress ());
292291 }
292+
293+ @ Test
294+ public void testUnspecifiedProjectSettings () {
295+ Reader reader = new StringReader ("<grip:Pipeline>" +
296+ " <sources/>" +
297+ " <steps/>" +
298+ " <connections/>" +
299+ " <settings/>" +
300+ "</grip:Pipeline>" );
301+
302+ project .open (reader );
303+
304+ assertNotNull ("Project setting was null" , pipeline .getProjectSettings ().getDeployJvmOptions ());
305+ }
293306}
0 commit comments