2222import java .io .StringWriter ;
2323import java .io .Writer ;
2424
25+ import static junit .framework .Assert .assertNotNull ;
2526import static junit .framework .TestCase .assertEquals ;
2627import static org .bytedeco .javacpp .opencv_core .*;
2728
@@ -142,7 +143,7 @@ public void testPerformSerializedStep() throws Exception {
142143 serializeAndDeserialize ();
143144
144145
145- final Step fromPipeline = pipeline .getSteps ().get (0 );
146+ final Step fromPipeline = pipeline .getSteps ().get (0 );
146147 InputSocket <Number > a = (InputSocket <Number >) fromPipeline .getInputSockets ()[0 ];
147148 InputSocket <Number > b = (InputSocket <Number >) fromPipeline .getInputSockets ()[1 ];
148149 OutputSocket <Number > sum = (OutputSocket <Number >) fromPipeline .getOutputSockets ()[0 ];
@@ -161,7 +162,7 @@ public void testPerformSerializedPythonStepFromURL() throws Exception {
161162 pipeline .addStep (stepFactory .create (pythonAdditionOperationFromURL ));
162163 serializeAndDeserialize ();
163164
164- final Step fromPipeline = pipeline .getSteps ().get (0 );
165+ final Step fromPipeline = pipeline .getSteps ().get (0 );
165166 InputSocket <Number > a = (InputSocket <Number >) fromPipeline .getInputSockets ()[0 ];
166167 InputSocket <Number > b = (InputSocket <Number >) fromPipeline .getInputSockets ()[1 ];
167168 OutputSocket <Number > sum = (OutputSocket <Number >) fromPipeline .getOutputSockets ()[0 ];
@@ -181,7 +182,7 @@ public void testPerformSerializedPythonStepFromSource() throws Exception {
181182 pipeline .addStep (stepFactory .create (pythonAdditionOperationFromSource ));
182183 serializeAndDeserialize ();
183184
184- final Step fromPipeline = pipeline .getSteps ().get (0 );
185+ final Step fromPipeline = pipeline .getSteps ().get (0 );
185186 InputSocket <Number > a = (InputSocket <Number >) fromPipeline .getInputSockets ()[0 ];
186187 InputSocket <Number > b = (InputSocket <Number >) fromPipeline .getInputSockets ()[1 ];
187188 OutputSocket <Number > sum = (OutputSocket <Number >) fromPipeline .getOutputSockets ()[0 ];
@@ -218,7 +219,6 @@ public void testPerformSerializedPipeline() throws Exception {
218219 OutputSocket <Number > sum2 = (OutputSocket <Number >) step2Out .getOutputSockets ()[0 ];
219220
220221
221-
222222 a1 .setValue (123 );
223223 b1 .setValue (456 );
224224 b2 .setValue (789 );
@@ -240,7 +240,6 @@ public void testPerformSerializedPipelineWithMats() throws Exception {
240240 OutputSocket <Mat > sum = (OutputSocket <Mat >) step1 .getOutputSockets ()[0 ];
241241
242242
243-
244243 a .setValue (new Mat (1 , 1 , CV_32F , new Scalar (1234.5 )));
245244 b .setValue (new Mat (1 , 1 , CV_32F , new Scalar (6789.0 )));
246245
@@ -280,4 +279,18 @@ public void testSerializedProjectSettings() {
280279 assertEquals ("Deploy address was not serialized/deserialized" ,
281280 "roborio-191-frc.local" , pipeline .getProjectSettings ().getDeployAddress ());
282281 }
282+
283+ @ Test
284+ public void testUnspecifiedProjectSettings () {
285+ Reader reader = new StringReader ("<grip:Pipeline>" +
286+ " <sources/>" +
287+ " <steps/>" +
288+ " <connections/>" +
289+ " <settings/>" +
290+ "</grip:Pipeline>" );
291+
292+ project .open (reader );
293+
294+ assertNotNull ("Project setting was null" , pipeline .getProjectSettings ().getDeployJvmOptions ());
295+ }
283296}
0 commit comments