summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@nokia.com>2011-09-07 14:53:21 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-07 15:52:20 +0200
commitebfcb7eb78d0e895c814379ccf67b7c2bd46acad (patch)
treea653f289900b83766a6363ae54252c2d3ae46a77 /tests
parenta6e0e7909bc6eaaf2d1fd1dc17cab85d90dcdc61 (diff)
Fix missing curly brackets in tst_global.cpp.
Those are required when exception handling is disabled. Change-Id: I9ac862758bd961f4593a66d3e28005d766959478 Reviewed-on: http://codereview.qt.nokia.com/4359 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qglobal/tst_qglobal.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/auto/qglobal/tst_qglobal.cpp b/tests/auto/qglobal/tst_qglobal.cpp
index 19a13f6ad0..85aa03f642 100644
--- a/tests/auto/qglobal/tst_qglobal.cpp
+++ b/tests/auto/qglobal/tst_qglobal.cpp
@@ -213,7 +213,7 @@ void tst_QGlobal::qtry()
// check propper if/else scoping
i = 0;
- if (true)
+ if (true) {
QT_TRY {
i = 2;
QT_THROW(42);
@@ -222,12 +222,13 @@ void tst_QGlobal::qtry()
QCOMPARE(i, 2);
i = 4;
}
- else
+ } else {
QCOMPARE(i, 0);
+ }
QCOMPARE(i, 4);
i = 0;
- if (false)
+ if (false) {
QT_TRY {
i = 2;
QT_THROW(42);
@@ -236,14 +237,15 @@ void tst_QGlobal::qtry()
QCOMPARE(i, 2);
i = 2;
}
- else
+ } else {
i = 8;
+ }
QCOMPARE(i, 8);
i = 0;
- if (false)
+ if (false) {
i = 42;
- else
+ } else {
QT_TRY {
i = 2;
QT_THROW(42);
@@ -252,6 +254,7 @@ void tst_QGlobal::qtry()
QCOMPARE(i, 2);
i = 4;
}
+ }
QCOMPARE(i, 4);
}