aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/nodes/tst_nodestest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/nodes/tst_nodestest.cpp')
-rw-r--r--tests/auto/quick/nodes/tst_nodestest.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp
index e017cae422..37a73cca6f 100644
--- a/tests/auto/quick/nodes/tst_nodestest.cpp
+++ b/tests/auto/quick/nodes/tst_nodestest.cpp
@@ -82,19 +82,24 @@ void NodesTest::initTestCase()
surface = new QOffscreenSurface;
surface->create();
+ QVERIFY(surface->isValid());
context = new QOpenGLContext();
- context->create();
- context->makeCurrent(surface);
+ QVERIFY(context->create());
+ QVERIFY(context->makeCurrent(surface));
renderContext = renderLoop->createRenderContext(renderLoop->sceneGraphContext());
+ QVERIFY(renderContext);
renderContext->initialize(context);
+ QVERIFY(renderContext->isValid());
}
void NodesTest::cleanupTestCase()
{
- renderContext->invalidate();
- context->doneCurrent();
+ if (renderContext)
+ renderContext->invalidate();
+ if (context)
+ context->doneCurrent();
delete context;
delete surface;
}
@@ -133,10 +138,12 @@ public:
int DummyRenderer::globalRendereringOrder;
NodesTest::NodesTest()
+ : surface(Q_NULLPTR)
+ , context(Q_NULLPTR)
+ , renderContext(Q_NULLPTR)
{
}
-
void NodesTest::propegate()
{
QSGRootNode root;