From ebfcb7eb78d0e895c814379ccf67b7c2bd46acad Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Wed, 7 Sep 2011 14:53:21 +0200 Subject: [PATCH] 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 Reviewed-by: Oswald Buddenhagen --- tests/auto/qglobal/tst_qglobal.cpp | 15 +++++++++------ 1 file 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); }