QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
QgsRasterChecker Class Reference

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.
QString report ()
bool runTest (QString theVerifiedKey, QString theVerifiedUri, QString theExpectedKey, QString theExpectedUri)
 Test using renderer to generate the image to be compared.

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

Detailed Description

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.

Constructor & Destructor Documentation

QgsRasterChecker::QgsRasterChecker ( )

Definition at line 31 of file qgsrasterchecker.cpp.

References mCellStyle, mErrMsgStyle, mErrStyle, mOkStyle, and mTabStyle.

QgsRasterChecker::~QgsRasterChecker ( )
inline

Destructor.

Definition at line 36 of file qgsrasterchecker.h.

Member Function Documentation

bool QgsRasterChecker::compare ( double  verifiedVal,
double  expectedVal,
double  theTolerance 
)
private

Definition at line 225 of file qgsrasterchecker.cpp.

Referenced by compare(), and runTest().

void QgsRasterChecker::compare ( QString  theParamName,
int  verifiedVal,
int  expectedVal,
QString &  theReport,
bool &  theOk 
)
private

Definition at line 218 of file qgsrasterchecker.cpp.

References compareRow().

void QgsRasterChecker::compare ( QString  theParamName,
double  verifiedVal,
double  expectedVal,
QString &  theReport,
bool &  theOk,
double  theTolerance = 0 
)
private

Definition at line 231 of file qgsrasterchecker.cpp.

References compare(), and compareRow().

QString QgsRasterChecker::compareHead ( )
private

Definition at line 211 of file qgsrasterchecker.cpp.

References mCellStyle.

Referenced by runTest().

void QgsRasterChecker::compareRow ( QString  theParamName,
QString  verifiedVal,
QString  expectedVal,
QString &  theReport,
bool  theOk,
QString  theDifference = "",
QString  theTolerance = "" 
)
private

Definition at line 238 of file qgsrasterchecker.cpp.

References mCellStyle, mErrStyle, and mOkStyle.

Referenced by compare(), and runTest().

void QgsRasterChecker::error ( QString  theMessage,
QString &  theReport 
)
private

Definition at line 197 of file qgsrasterchecker.cpp.

References mErrMsgStyle.

Referenced by runTest().

QString QgsRasterChecker::report ( )
inline

Definition at line 38 of file qgsrasterchecker.h.

bool QgsRasterChecker::runTest ( QString  theVerifiedKey,
QString  theVerifiedUri,
QString  theExpectedKey,
QString  theExpectedUri 
)
double QgsRasterChecker::tolerance ( double  val,
int  places = 6 
)
private

Definition at line 204 of file qgsrasterchecker.cpp.

Referenced by runTest().

Member Data Documentation

QString QgsRasterChecker::mCellStyle
private

Definition at line 53 of file qgsrasterchecker.h.

Referenced by compareHead(), compareRow(), QgsRasterChecker(), and runTest().

QString QgsRasterChecker::mCheckedUri
private

Definition at line 51 of file qgsrasterchecker.h.

QString QgsRasterChecker::mErrMsgStyle
private

Definition at line 56 of file qgsrasterchecker.h.

Referenced by error(), and QgsRasterChecker().

QString QgsRasterChecker::mErrStyle
private

Definition at line 55 of file qgsrasterchecker.h.

Referenced by compareRow(), QgsRasterChecker(), and runTest().

QString QgsRasterChecker::mExpectedUri
private

Definition at line 50 of file qgsrasterchecker.h.

QString QgsRasterChecker::mOkStyle
private

Definition at line 54 of file qgsrasterchecker.h.

Referenced by compareRow(), QgsRasterChecker(), and runTest().

QString QgsRasterChecker::mReport
private

Definition at line 49 of file qgsrasterchecker.h.

Referenced by runTest().

QString QgsRasterChecker::mTabStyle
private

Definition at line 52 of file qgsrasterchecker.h.

Referenced by QgsRasterChecker(), and runTest().


The documentation for this class was generated from the following files: