Skip to content
Permalink
Browse files
Make more tests work - only 4/16 fail now
  • Loading branch information
timlinux committed Nov 14, 2011
1 parent 8dc8222 commit 306d1a4
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 93 deletions.
@@ -49,7 +49,6 @@ class TestQgsRenderers: public QObject
void uniqueValue();
void graduatedSymbol();
void continuousSymbol();
void checkClassificationFieldMismatch();
private:
bool mTestHasError;
bool setQml( QString theType ); //uniquevalue / continuous / single /
@@ -68,7 +67,8 @@ void TestQgsRenderers::initTestCase()
mTestHasError = false;
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication::init( INSTALL_PREFIX );
QgsApplication::initQgis( );
QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
@@ -167,19 +167,6 @@ void TestQgsRenderers::continuousSymbol()
QVERIFY( imageCheck( "continuous" ) );
}

void TestQgsRenderers::checkClassificationFieldMismatch()
{
mReport += "<h2>Classification field mismatch test</h2>\n";
// Here we test to see that a qml created for one layer
// will raise an error properly if the
// We will do this by trying to apply the points qml to the polys shpfile
// it should fail and raise an error
QString myFileName = mTestDataDir + "points_continuous_symbol.qml";
bool myStyleFlag = false;
mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag );
QVERIFY( !myStyleFlag ); //we are expecting this to have raised an error
}

//
// Private helper functions not called directly by CTest
//
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,80 +1,73 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
<id>polys20080110101725465</id>
<datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/polys.shp</datasource>
<layername>polys</layername>
<srs>
<spatialrefsys>
<proj4>+proj=longlat +ellps=WGS84 +no_defs</proj4>
<srsid>1449</srsid>
<srid>4031</srid>
<epsg>4031</epsg>
<description>Unknown datum based upon the GEM 10C ellipsoid</description>
<projectionacronym>longlat</projectionacronym>
<ellipsoidacronym>WGS84</ellipsoidacronym>
<geographicflag>true</geographicflag>
</spatialrefsys>
</srs>
<transparencyLevelInt>255</transparencyLevelInt>
<provider>ogr</provider>
<encoding>System</encoding>
<classificationattribute>Value</classificationattribute>
<displayfield>Name</displayfield>
<label>0</label>
<attributeactions/>
<continuoussymbol>
<classificationfield>Value</classificationfield>
<polygonoutline>1</polygonoutline>
<lowestsymbol>
<symbol>
<lowervalue>7.000000</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>hard:circle</pointsymbol>
<pointsize>11</pointsize>
<rotationclassificationfield>-1</rotationclassificationfield>
<scaleclassificationfield>-1</scaleclassificationfield>
<outlinecolor red="0" blue="0" green="0" />
<outlinestyle>SolidLine</outlinestyle>
<outlinewidth>0.4</outlinewidth>
<fillcolor red="94" blue="213" green="172" />
<fillpattern>SolidPattern</fillpattern>
<texturepath></texturepath>
</symbol>
</lowestsymbol>
<highestsymbol>
<symbol>
<lowervalue>20.000000</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>hard:circle</pointsymbol>
<pointsize>11</pointsize>
<rotationclassificationfield>-1</rotationclassificationfield>
<scaleclassificationfield>-1</scaleclassificationfield>
<outlinecolor red="0" blue="0" green="0" />
<outlinestyle>SolidLine</outlinestyle>
<outlinewidth>0.4</outlinewidth>
<fillcolor red="59" blue="134" green="49" />
<fillpattern>SolidPattern</fillpattern>
<texturepath></texturepath>
</symbol>
</highestsymbol>
</continuoussymbol>
<labelattributes>
<label field="" text="Label" />
<family field="" name="Lucida Grande" />
<size field="" units="pt" value="12" />
<bold field="" on="0" />
<italic field="" on="0" />
<underline field="" on="0" />
<color field="" red="0" blue="0" green="0" />
<x field="" />
<y field="" />
<offset x="0" y="0" yfield="-1" xfield="-1" units="pt" />
<angle field="" value="0" />
<alignment field="-1" value="center" />
<buffercolor field="" red="255" blue="255" green="255" />
<buffersize field="" units="pt" value="1" />
<bufferenabled field="" on="" />
</labelattributes>
<qgis version="1.9.90-Alpha" minimumScale="1" maximumScale="1e+08" minLabelScale="1" maxLabelScale="1e+08" hasScaleBasedVisibilityFlag="0" scaleBasedLabelVisibilityFlag="0">
<transparencyLevelInt>227</transparencyLevelInt>
<classificationattribute>Name</classificationattribute>
<uniquevalue>
<classificationfield>Name</classificationfield>
<symbol>
<lowervalue>Dam</lowervalue>
<uppervalue></uppervalue>
<label>Dam</label>
<pointsymbol>hard:circle</pointsymbol>
<pointsize>11</pointsize>
<pointsizeunits>pixels</pointsizeunits>
<rotationclassificationfieldname></rotationclassificationfieldname>
<scaleclassificationfieldname></scaleclassificationfieldname>
<symbolfieldname></symbolfieldname>
<outlinecolor red="159" blue="159" green="159"/>
<outlinestyle>SolidLine</outlinestyle>
<outlinewidth>2</outlinewidth>
<fillcolor red="27" blue="212" green="54"/>
<fillpattern>Dense4Pattern</fillpattern>
<texturepath></texturepath>
</symbol>
<symbol>
<lowervalue>Lake</lowervalue>
<uppervalue></uppervalue>
<label>Lake</label>
<pointsymbol>hard:circle</pointsymbol>
<pointsize>11</pointsize>
<pointsizeunits>pixels</pointsizeunits>
<rotationclassificationfieldname></rotationclassificationfieldname>
<scaleclassificationfieldname></scaleclassificationfieldname>
<symbolfieldname></symbolfieldname>
<outlinecolor red="144" blue="144" green="144"/>
<outlinestyle>SolidLine</outlinestyle>
<outlinewidth>1</outlinewidth>
<fillcolor red="110" blue="217" green="194"/>
<fillpattern>SolidPattern</fillpattern>
<texturepath></texturepath>
</symbol>
</uniquevalue>
<customproperties/>
<displayfield>Name</displayfield>
<label>0</label>
<labelattributes>
<label fieldname="" text="Label"/>
<family fieldname="" name="Lucida Grande"/>
<size fieldname="" units="pt" value="12"/>
<bold fieldname="" on="0"/>
<italic fieldname="" on="0"/>
<underline fieldname="" on="0"/>
<strikeout fieldname="" on="0"/>
<color fieldname="" red="0" blue="0" green="0"/>
<x fieldname=""/>
<y fieldname=""/>
<offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
<angle fieldname="" value="0" auto="0"/>
<alignment fieldname="" value="center"/>
<buffercolor fieldname="" red="255" blue="255" green="255"/>
<buffersize fieldname="" units="pt" value="1"/>
<bufferenabled fieldname="" on=""/>
<multilineenabled fieldname="" on=""/>
<selectedonly on=""/>
</labelattributes>
<edittypes>
<edittype type="0" name="Name"/>
<edittype type="0" name="Value"/>
</edittypes>
<editform></editform>
<editforminit></editforminit>
<annotationform></annotationform>
<attributeactions/>
</qgis>

0 comments on commit 306d1a4

Please sign in to comment.