Skip to content
Permalink
Browse files

Fix travis build

  • Loading branch information
nyalldawson committed Mar 16, 2020
1 parent 517aa96 commit 9c85a3a48b4e73934489b74bf97a8ee7d071944f
Showing with 21 additions and 21 deletions.
  1. +21 −21 tests/src/gui/testprocessinggui.cpp
@@ -5228,7 +5228,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5240,7 +5240,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel.setValue( QStringLiteral( "memory:" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5255,7 +5255,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
QCOMPARE( changedSpy.count(), 1 );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "ogr:dbname='/me/a.gpkg' table=\"d\" (geom) sql=''" ) );
QVERIFY( !panel.outputIsSkipped() );
panel.setValue( QStringLiteral( "ogr:dbname='/me/a.gpkg' table=\"d\" (geom) sql=''" ) );
@@ -5265,7 +5265,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel.setValue( QStringLiteral( "postgis:dbname='oraclesux' host=10.1.1.221 port=5432 user='qgis' password='qgis' table=\"stufff\".\"output\" (the_geom) sql=" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "postgis:dbname='oraclesux' host=10.1.1.221 port=5432 user='qgis' password='qgis' table=\"stufff\".\"output\" (the_geom) sql=" ) );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5277,7 +5277,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel.setValue( QStringLiteral( "/home/me/test.shp" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "/home/me/test.shp" ) );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5294,7 +5294,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel.setValue( QStringLiteral( "test.shp" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), TEST_DATA_DIR + QStringLiteral( "/test.shp" ) );

// optional, test skipping
@@ -5313,7 +5313,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel2.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel2.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel2.outputIsSkipped() );
QCOMPARE( skipSpy2.count(), 0 );
@@ -5345,7 +5345,7 @@ void TestProcessingGui::testOutputDefinitionWidget()
panel3.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel3.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel3.outputIsSkipped() );
QCOMPARE( skipSpy3.count(), 1 );
@@ -5381,7 +5381,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5393,7 +5393,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel.setValue( QStringLiteral( "memory:" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5408,7 +5408,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
QCOMPARE( changedSpy.count(), 1 );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "ogr:dbname='/me/a.gpkg' table=\"d\" (geom) sql=''" ) );
QVERIFY( !panel.outputIsSkipped() );
panel.setValue( QStringLiteral( "ogr:dbname='/me/a.gpkg' table=\"d\" (geom) sql=''" ) );
@@ -5418,7 +5418,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel.setValue( QStringLiteral( "postgis:dbname='oraclesux' host=10.1.1.221 port=5432 user='qgis' password='qgis' table=\"stufff\".\"output\" (the_geom) sql=" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "postgis:dbname='oraclesux' host=10.1.1.221 port=5432 user='qgis' password='qgis' table=\"stufff\".\"output\" (the_geom) sql=" ) );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5430,7 +5430,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel.setValue( QStringLiteral( "/home/me/test.shp" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "/home/me/test.shp" ) );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5447,7 +5447,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel.setValue( QStringLiteral( "test.shp" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), TEST_DATA_DIR + QStringLiteral( "/test.shp" ) );

// optional, test skipping
@@ -5466,7 +5466,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel2.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel2.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel2.outputIsSkipped() );
QCOMPARE( skipSpy2.count(), 0 );
@@ -5498,7 +5498,7 @@ void TestProcessingGui::testOutputDefinitionWidgetVectorOut()
panel3.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel3.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel3.outputIsSkipped() );
QCOMPARE( skipSpy3.count(), 1 );
@@ -5534,7 +5534,7 @@ void TestProcessingGui::testOutputDefinitionWidgetRasterOut()
panel.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel.outputIsSkipped() );
QCOMPARE( skipSpy.count(), 0 );
@@ -5548,7 +5548,7 @@ void TestProcessingGui::testOutputDefinitionWidgetRasterOut()
QCOMPARE( changedSpy.count(), 1 );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QStringLiteral( "/home/me/test.tif" ) );
QVERIFY( !panel.outputIsSkipped() );
panel.setValue( QStringLiteral( "/home/me/test.tif" ) );
@@ -5560,7 +5560,7 @@ void TestProcessingGui::testOutputDefinitionWidgetRasterOut()
panel.setValue( QStringLiteral( "test.tif" ) );
v = panel.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), TEST_DATA_DIR + QStringLiteral( "/test.tif" ) );

// optional, test skipping
@@ -5579,7 +5579,7 @@ void TestProcessingGui::testOutputDefinitionWidgetRasterOut()
panel2.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel2.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel2.outputIsSkipped() );
QCOMPARE( skipSpy2.count(), 0 );
@@ -5611,7 +5611,7 @@ void TestProcessingGui::testOutputDefinitionWidgetRasterOut()
panel3.setValue( QgsProcessing::TEMPORARY_OUTPUT );
v = panel3.value();
QVERIFY( v.canConvert< QgsProcessingOutputLayerDefinition>() );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().createOptions.value( QStringLiteral( "fileEncoding" ) ).toString(), QStringLiteral( "System" ) );
QCOMPARE( v.value< QgsProcessingOutputLayerDefinition>().sink.staticValue().toString(), QgsProcessing::TEMPORARY_OUTPUT );
QVERIFY( !panel3.outputIsSkipped() );
QCOMPARE( skipSpy3.count(), 1 );

0 comments on commit 9c85a3a

Please sign in to comment.
You can’t perform that action at this time.