summaryrefslogtreecommitdiffstats
path: root/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2014-10-21 11:05:45 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2014-10-21 11:23:12 +0300
commitf7f1e1373e652ea2de1666f4b626bf35e367d84b (patch)
tree1f459e063e0f87e302bf331a1a6f95252577ac3b /tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
parent0cc8662c1b245c50910f44153fdb3124dd22abd8 (diff)
Added C++ autotests for series
Also fixed a bug found in testing, and added tests for optional constructors for already tested classes. Task-number: QTRD-3368 Change-Id: I2214f28e2c5069ecab422fc6817acb2f0c0b192b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Diffstat (limited to 'tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp')
-rw-r--r--tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp b/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
index 8e998568..20ed1aeb 100644
--- a/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
@@ -65,6 +65,20 @@ void tst_proxy::construct()
QHeightMapSurfaceDataProxy *proxy = new QHeightMapSurfaceDataProxy();
QVERIFY(proxy);
delete proxy;
+
+ proxy = new QHeightMapSurfaceDataProxy(QImage(QSize(10, 10), QImage::Format_ARGB32));
+ QVERIFY(proxy);
+ QCoreApplication::processEvents();
+ QCOMPARE(proxy->columnCount(), 10);
+ QCOMPARE(proxy->rowCount(), 10);
+ delete proxy;
+
+ proxy = new QHeightMapSurfaceDataProxy(":/customtexture.jpg");
+ QVERIFY(proxy);
+ QCoreApplication::processEvents();
+ QCOMPARE(proxy->columnCount(), 24);
+ QCOMPARE(proxy->rowCount(), 24);
+ delete proxy;
}
void tst_proxy::initialProperties()