|
QGIS API Documentation
2.4.0-Chugiak
|
This is a helper class for unit tests that need to write an image and compare it to an expected result or render time. More...
#include <qgsrasterchecker.h>
Public Member Functions | |
| QgsRasterChecker () | |
| ~QgsRasterChecker () | |
| Destructor. More... | |
| QString | report () |
| bool | runTest (QString theVerifiedKey, QString theVerifiedUri, QString theExpectedKey, QString theExpectedUri) |
| Test using renderer to generate the image to be compared. More... | |
Private Member Functions | |
| void | error (QString theMessage, QString &theReport) |
| QString | compareHead () |
| bool | compare (double verifiedVal, double expectedVal, double theTolerance) |
| void | compare (QString theParamName, int verifiedVal, int expectedVal, QString &theReport, bool &theOk) |
| void | compare (QString theParamName, double verifiedVal, double expectedVal, QString &theReport, bool &theOk, double theTolerance=0) |
| void | compareRow (QString theParamName, QString verifiedVal, QString expectedVal, QString &theReport, bool theOk, QString theDifference="", QString theTolerance="") |
| double | tolerance (double val, int places=6) |
Private Attributes | |
| QString | mReport |
| QString | mExpectedUri |
| QString | mCheckedUri |
| QString | mTabStyle |
| QString | mCellStyle |
| QString | mOkStyle |
| QString | mErrStyle |
| QString | mErrMsgStyle |
This is a helper class for unit tests that need to write an image and compare it to an expected result or render time.
Definition at line 29 of file qgsrasterchecker.h.
| QgsRasterChecker::QgsRasterChecker | ( | ) |
Definition at line 31 of file qgsrasterchecker.cpp.
References mCellStyle, mErrMsgStyle, mErrStyle, mOkStyle, and mTabStyle.
|
inline |
Destructor.
Definition at line 36 of file qgsrasterchecker.h.
|
private |
Definition at line 225 of file qgsrasterchecker.cpp.
|
private |
Definition at line 218 of file qgsrasterchecker.cpp.
References compareRow().
|
private |
Definition at line 231 of file qgsrasterchecker.cpp.
References compare(), and compareRow().
|
private |
Definition at line 211 of file qgsrasterchecker.cpp.
References mCellStyle.
Referenced by runTest().
|
private |
Definition at line 238 of file qgsrasterchecker.cpp.
References mCellStyle, mErrStyle, and mOkStyle.
|
private |
Definition at line 197 of file qgsrasterchecker.cpp.
References mErrMsgStyle.
Referenced by runTest().
|
inline |
Definition at line 38 of file qgsrasterchecker.h.
| bool QgsRasterChecker::runTest | ( | QString | theVerifiedKey, |
| QString | theVerifiedUri, | ||
| QString | theExpectedKey, | ||
| QString | theExpectedUri | ||
| ) |
Test using renderer to generate the image to be compared.
| theVerifiedKey | verified provider key |
| theVerifiedUri | URI of the raster to be verified |
| theExpectedKey | expected provider key |
| theExpectedUri | URI of the expected (control) raster |
Definition at line 41 of file qgsrasterchecker.cpp.
References QgsRasterInterface::bandCount(), QgsRasterInterface::bandStatistics(), QgsRasterDataProvider::block(), compare(), compareHead(), compareRow(), QgsRasterDataProvider::dataType(), error(), QgsRasterDataProvider::extent(), QgsProviderRegistry::instance(), QgsRasterBlock::isValid(), QgsDataProvider::isValid(), QgsRasterBandStats::maximumValue, mCellStyle, QgsRasterBandStats::mean, mErrStyle, QgsRasterBandStats::minimumValue, mOkStyle, mReport, mTabStyle, QgsProviderRegistry::provider(), QgsRasterDataProvider::srcDataType(), QgsRasterBandStats::stdDev, tolerance(), QgsRectangle::toString(), QgsRasterBlock::value(), QgsRasterInterface::xSize(), and QgsRasterInterface::ySize().
|
private |
Definition at line 204 of file qgsrasterchecker.cpp.
Referenced by runTest().
|
private |
Definition at line 53 of file qgsrasterchecker.h.
Referenced by compareHead(), compareRow(), QgsRasterChecker(), and runTest().
|
private |
Definition at line 51 of file qgsrasterchecker.h.
|
private |
Definition at line 56 of file qgsrasterchecker.h.
Referenced by error(), and QgsRasterChecker().
|
private |
Definition at line 55 of file qgsrasterchecker.h.
Referenced by compareRow(), QgsRasterChecker(), and runTest().
|
private |
Definition at line 50 of file qgsrasterchecker.h.
|
private |
Definition at line 54 of file qgsrasterchecker.h.
Referenced by compareRow(), QgsRasterChecker(), and runTest().
|
private |
Definition at line 49 of file qgsrasterchecker.h.
Referenced by runTest().
|
private |
Definition at line 52 of file qgsrasterchecker.h.
Referenced by QgsRasterChecker(), and runTest().
1.8.7