Skip to content
Permalink
Browse files

Added some more helpful stdout stuff

git-svn-id: http://svn.osgeo.org/qgis/trunk@7193 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Sep 12, 2007
1 parent 553fda2 commit 93e45f0d49dfc795801d99b3811d4b225bcd2cca
Showing with 15 additions and 5 deletions.
  1. +15 −5 tests/src/core/testqgsvectorfilewriter.cpp
@@ -71,17 +71,27 @@ class TestQgsVectorFileWriter: public QObject
QgsGeometry * mypGeometry = QgsGeometry::fromPoint(myPoint);
QgsFeature myFeature;
myFeature.setGeometry(mypGeometry);
myFeature.addAttribute(0,"HelloWorld");
myFeature.addAttribute(1,"HelloWorld");
//
// Write the featyre to the filewriter
//
myWriter.addFeature(myFeature);
myError = myWriter.hasError();
Q_ASSERT(myError==QgsVectorFileWriter::NoError);
if(myError==QgsVectorFileWriter::ErrDriverNotFound)
{
std::cout << "Driver not found error" << std::endl;
}

if (myError==QgsVectorFileWriter::ErrCreateDataSource)
{
std::cout << "Create data source error" << std::endl;
}
if (myError==QgsVectorFileWriter::ErrCreateLayer)
{
std::cout << "Create layer error" << std::endl;
}
QVERIFY(myError==QgsVectorFileWriter::NoError);
// other possible outcomes...
//QgsVectorFileWriter::ErrDriverNotFound:
//QgsVectorFileWriter::ErrCreateDataSource:
//QgsVectorFileWriter::ErrCreateLayer:
delete mypGeometry;
}
};

0 comments on commit 93e45f0

Please sign in to comment.