"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/src/providers/testqgswmscapabilities.cpp" between
QGIS-final-3_14_15.tar.gz and QGIS-final-3_14_16.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Latest release (3.14.x series).

testqgswmscapabilities.cpp  (QGIS-final-3_14_15):testqgswmscapabilities.cpp  (QGIS-final-3_14_16)
skipping to change at line 251 skipping to change at line 251
QDomDocument doc; QDomDocument doc;
doc.setContent( dimension ); doc.setContent( dimension );
QgsWmsCapabilities cap; QgsWmsCapabilities cap;
QgsWmsDimensionProperty dimensionProperty; QgsWmsDimensionProperty dimensionProperty;
cap.parseDimension( doc.documentElement(), dimensionProperty ); cap.parseDimension( doc.documentElement(), dimensionProperty );
QCOMPARE( dimensionProperty.extent, extent ); QCOMPARE( dimensionProperty.extent, extent );
} }
void wmsLayerProperty_data()
{
QTest::addColumn<QString>( "firstLayer" );
QTest::addColumn<QString>( "secondLayer" );
QTest::addColumn<bool>( "result" );
QTest::newRow( "equal properties" ) << R"""(<Layer queryable="0" opaque="0
" cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny
="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90"
maxx="180" maxy="90" />
<Dimension name="time" units="ISO86
01">
2020-01-01
</Dimension>
</Layer>)"""
<< R"""(<Layer queryable="0" opaque="0
" cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny
="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90"
maxx="180" maxy="90" />
<Dimension name="time" units="ISO86
01">
2020-01-01
</Dimension>
</Layer>)"""
<< true;
QTest::newRow( "different names" ) << R"""(<Layer queryable="0" opaque="0"
cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny=
"-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90" m
axx="180" maxy="90" />
<Dimension name="time" units="ISO860
1">
2020-01-01
</Dimension>
</Layer>)"""
<< R"""(<Layer queryable="0" opaque="0"
cascaded="0">
<Name>Test2</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny=
"-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90" m
axx="180" maxy="90" />
<Dimension name="time" units="ISO860
1">
2020-01-01
</Dimension>
</Layer>)"""
<< false;
QTest::newRow( "different titles" ) << R"""(<Layer queryable="0" opaque="0
" cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny
="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90"
maxx="180" maxy="90" />
<Dimension name="time" units="ISO86
01">
2020-01-01
</Dimension>
</Layer>)"""
<< R"""(<Layer queryable="0" opaque="0
" cascaded="0">
<Name>Test</Name>
<Title>Test2</Title>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny
="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90"
maxx="180" maxy="90" />
<Dimension name="time" units="ISO86
01">
2020-01-01
</Dimension>
</Layer>)"""
<< false;
QTest::newRow( "different abstract" ) << R"""(<Layer queryable="0" opaque=
"0" cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny
="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90"
maxx="180" maxy="90" />
<Dimension name="time" units="ISO86
01">
2020-01-01
</Dimension>
</Layer>)"""
<< R"""(<Layer queryable="0" opaque=
"0" cascaded="0">
<Name>Test</Name>
<Title>Test2</Title>
<Abstract>Test2</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny
="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:4326"
minx="-180" miny="-90"
maxx="180" maxy="90" />
<Dimension name="time" units="ISO86
01">
2020-01-01
</Dimension>
</Layer>)"""
<< false;
QTest::newRow( "different dimension extent" ) << R"""(<Layer queryable="0"
opaque="0" cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="
-180" miny="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:43
26"
minx="-180" m
iny="-90" maxx="180" maxy="90" />
<Dimension name="time" un
its="ISO8601">
2020-01-01
</Dimension>
</Layer>)"""
<< R"""(<Layer queryable="0" opaque="0" cascaded="0">
<Name>Test</Name>
<Title>Test</Title>
<Abstract>Test</Abstract>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="
-180" miny="-90" maxx="180" maxy="90" />
<BoundingBox SRS="EPSG:43
26"
minx="-180" m
iny="-90" maxx="180" maxy="90" />
<Dimension name="time" un
its="ISO8601">
2020-01-01/2020-12-31/P1M
</Dimension>
</Layer>)"""
<< false;
}
void wmsLayerProperty()
{
QFETCH( QString, firstLayer );
QFETCH( QString, secondLayer );
QFETCH( bool, result );
QDomDocument doc;
doc.setContent( firstLayer );
QDomDocument doc2;
doc2.setContent( secondLayer );
QgsWmsCapabilities cap;
QgsWmsLayerProperty firstLayerProp;
QgsWmsLayerProperty secondLayerProp;
cap.parseLayer( doc.documentElement(), firstLayerProp );
cap.parseLayer( doc2.documentElement(), secondLayerProp );
QCOMPARE( firstLayerProp.equal( secondLayerProp ), result );
}
}; };
QGSTEST_MAIN( TestQgsWmsCapabilities ) QGSTEST_MAIN( TestQgsWmsCapabilities )
#include "testqgswmscapabilities.moc" #include "testqgswmscapabilities.moc"
 End of changes. 1 change blocks. 
0 lines changed or deleted 199 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)