diff options
Diffstat (limited to 'tests/auto/qglobal/tst_qglobal.cpp')
-rw-r--r-- | tests/auto/qglobal/tst_qglobal.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qglobal/tst_qglobal.cpp b/tests/auto/qglobal/tst_qglobal.cpp index 49e5d7d..28556be 100644 --- a/tests/auto/qglobal/tst_qglobal.cpp +++ b/tests/auto/qglobal/tst_qglobal.cpp @@ -51,6 +51,7 @@ private slots: void for_each(); void qassert(); void qtry(); + void checkptr(); }; void tst_QGlobal::qIsNull() @@ -252,5 +253,14 @@ void tst_QGlobal::qtry() QCOMPARE(i, 4); } +void tst_QGlobal::checkptr() +{ + int i; + QCOMPARE(q_check_ptr(&i), &i); + + const char *c = "hello"; + QCOMPARE(q_check_ptr(c), c); +} + QTEST_MAIN(tst_QGlobal) #include "tst_qglobal.moc" |