Skip to content
Permalink
Browse files

More (probably harmless) uninitialized variables in tests

  • Loading branch information
nyalldawson committed Feb 7, 2015
1 parent a3668f5 commit 5160d467cb24093a0bf5ce4e0ee02002d3cad5fc
@@ -26,11 +26,15 @@
class TestQgsZonalStatistics : public QObject
{
Q_OBJECT

public:
TestQgsZonalStatistics();

private slots:
void initTestCase();
void cleanupTestCase();
void init() {};
void cleanup() {};
void init() {}
void cleanup() {}

void testStatistics();

@@ -39,6 +43,12 @@ class TestQgsZonalStatistics : public QObject
QString mRasterPath;
};

TestQgsZonalStatistics::TestQgsZonalStatistics()
: mVectorLayer( NULL )
{

}

void TestQgsZonalStatistics::initTestCase()
{
QgsApplication::init();
@@ -36,11 +36,15 @@
class TestQgisAppClipboard : public QObject
{
Q_OBJECT

public:
TestQgisAppClipboard();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
void init() {};// will be called before each testfunction is executed.
void cleanup() {};// will be called after every testfunction.
void init() {} // will be called before each testfunction is executed.
void cleanup() {} // will be called after every testfunction.

void copyPaste();

@@ -49,6 +53,12 @@ class TestQgisAppClipboard : public QObject
QString mTestDataDir;
};

TestQgisAppClipboard::TestQgisAppClipboard()
: mQgisApp( NULL )
{

}

//runs before all tests
void TestQgisAppClipboard::initTestCase()
{
@@ -50,6 +50,10 @@
class Regression1141: public QObject
{
Q_OBJECT

public:
Regression1141();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -68,6 +72,12 @@ class Regression1141: public QObject
QString mFileName;
};

Regression1141::Regression1141()
: mError( QgsVectorFileWriter::NoError )
{

}

void Regression1141::initTestCase()
{
//
@@ -43,11 +43,15 @@
class Regression992 : public QObject
{
Q_OBJECT

public:
Regression992();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
void init() {};// will be called before each testfunction is executed.
void cleanup() {};// will be called after every testfunction.
void init() {}// will be called before each testfunction is executed.
void cleanup() {}// will be called after every testfunction.

void regression992();
private:
@@ -57,6 +61,12 @@ class Regression992 : public QObject
QString mReport;
};

Regression992::Regression992()
: mpRasterLayer( NULL )
{

}

//runs before all tests
void Regression992::initTestCase()
{
@@ -27,6 +27,10 @@
class TestQgsComposerHtml : public QObject
{
Q_OBJECT

public:
TestQgsComposerHtml();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -46,6 +50,12 @@ class TestQgsComposerHtml : public QObject
QFont mTestFont;
};

TestQgsComposerHtml::TestQgsComposerHtml()
: mComposition( NULL )
{

}

void TestQgsComposerHtml::initTestCase()
{
QgsApplication::init();
@@ -29,6 +29,10 @@
class TestQgsComposerMapGrid : public QObject
{
Q_OBJECT

public:
TestQgsComposerMapGrid();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -61,6 +65,13 @@ class TestQgsComposerMapGrid : public QObject
QString mReport;
};

TestQgsComposerMapGrid::TestQgsComposerMapGrid()
: mComposition( NULL )
, mComposerMap( NULL )
{

}

void TestQgsComposerMapGrid::initTestCase()
{
QgsApplication::init();
@@ -26,6 +26,10 @@
class TestQgsComposerMultiFrame : public QObject
{
Q_OBJECT

public:
TestQgsComposerMultiFrame();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -43,6 +47,12 @@ class TestQgsComposerMultiFrame : public QObject
QString mReport;
};

TestQgsComposerMultiFrame::TestQgsComposerMultiFrame()
: mComposition( NULL )
{

}

void TestQgsComposerMultiFrame::initTestCase()
{
mComposition = new QgsComposition( mMapSettings );
@@ -25,6 +25,10 @@
class TestQgsComposerObject : public QObject
{
Q_OBJECT

public:
TestQgsComposerObject();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -45,6 +49,12 @@ class TestQgsComposerObject : public QObject

};

TestQgsComposerObject::TestQgsComposerObject()
: mComposition( NULL )
{

}

void TestQgsComposerObject::initTestCase()
{
mComposition = new QgsComposition( mMapSettings );
@@ -27,6 +27,10 @@
class TestQgsComposerPicture : public QObject
{
Q_OBJECT

public:
TestQgsComposerPicture();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -66,6 +70,13 @@ class TestQgsComposerPicture : public QObject
QString mSvgImage;
};

TestQgsComposerPicture::TestQgsComposerPicture()
: mComposition( NULL )
, mComposerPicture( NULL )
{

}

void TestQgsComposerPicture::initTestCase()
{
QgsApplication::init();
@@ -28,6 +28,9 @@
class TestQgsComposerUtils : public QObject
{
Q_OBJECT
public:
TestQgsComposerUtils();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -66,6 +69,12 @@ class TestQgsComposerUtils : public QObject

};

TestQgsComposerUtils::TestQgsComposerUtils()
: mComposition( NULL )
{

}

void TestQgsComposerUtils::initTestCase()
{
QgsApplication::init();
@@ -31,6 +31,9 @@ class TestQgsComposition : public QObject
{
Q_OBJECT

public:
TestQgsComposition();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -47,6 +50,12 @@ class TestQgsComposition : public QObject
QString mReport;
};

TestQgsComposition::TestQgsComposition()
: mComposition( NULL )
{

}

void TestQgsComposition::initTestCase()
{
QgsApplication::init();
@@ -31,11 +31,14 @@ class TestQgsDataItem : public QObject
{
Q_OBJECT

public:
TestQgsDataItem();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
void init() {};// will be called before each testfunction is executed.
void cleanup() {};// will be called after every testfunction.
void init() {} // will be called before each testfunction is executed.
void cleanup() {} // will be called after every testfunction.

void testValid();
void testDirItemChildren();
@@ -46,6 +49,12 @@ class TestQgsDataItem : public QObject
bool isValidDirItem( QgsDirectoryItem *item );
};

TestQgsDataItem::TestQgsDataItem()
: mDirItem( NULL )
{

}

void TestQgsDataItem::initTestCase()
{
//
@@ -41,6 +41,10 @@
class TestQgsGeometry : public QObject
{
Q_OBJECT

public:
TestQgsGeometry();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -108,6 +112,16 @@ class TestQgsGeometry : public QObject
QString mReport;
};

TestQgsGeometry::TestQgsGeometry()
: mpPolylineGeometryD( NULL )
, mpPolygonGeometryA( NULL )
, mpPolygonGeometryB( NULL )
, mpPolygonGeometryC( NULL )
, mpPainter( NULL )
{

}


void TestQgsGeometry::init()
{
@@ -39,11 +39,15 @@
class TestQgsInvertedPolygon : public QObject
{
Q_OBJECT

public:
TestQgsInvertedPolygon();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
void init() {};// will be called before each testfunction is executed.
void cleanup() {};// will be called after every testfunction.
void init() {} // will be called before each testfunction is executed.
void cleanup() {} // will be called after every testfunction.

void singleSubRenderer();
void graduatedSubRenderer();
@@ -61,6 +65,13 @@ class TestQgsInvertedPolygon : public QObject
};


TestQgsInvertedPolygon::TestQgsInvertedPolygon()
: mTestHasError( false )
, mpPolysLayer( NULL )
{

}

void TestQgsInvertedPolygon::initTestCase()
{
mTestHasError = false;

0 comments on commit 5160d46

Please sign in to comment.
You can’t perform that action at this time.