summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-11-24 13:15:12 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-24 05:56:42 +0100
commitf32452e948cccfa9399b90448de11c5f08729a2c (patch)
tree606f59f24a017474efec598a52e175218bc06668 /tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
parent5116a25a55384d42d6e2d7df0bdeb0fd35799769 (diff)
Add missing indentation to QFuture test.
Change-Id: Iaceaa79237d5ef6e81d1d16dc5e3fd3d97631f3a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp')
-rw-r--r--tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp138
1 files changed, 68 insertions, 70 deletions
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
index b959dcb6f9..3e876cb848 100644
--- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
@@ -1320,90 +1320,88 @@ QFuture<void> createDerivedExceptionFuture()
void tst_QFuture::exceptions()
{
-
-// test throwing from waitForFinished
-{
- QFuture<void> f = createExceptionFuture();
- bool caught = false;
- try {
- f.waitForFinished();
- } catch (Exception &) {
- caught = true;
+ // test throwing from waitForFinished
+ {
+ QFuture<void> f = createExceptionFuture();
+ bool caught = false;
+ try {
+ f.waitForFinished();
+ } catch (Exception &) {
+ caught = true;
+ }
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-// test result()
-{
- QFuture<int> f = createExceptionResultFuture();
- bool caught = false;
- try {
- f.result();
- } catch (Exception &) {
- caught = true;
+ // test result()
+ {
+ QFuture<int> f = createExceptionResultFuture();
+ bool caught = false;
+ try {
+ f.result();
+ } catch (Exception &) {
+ caught = true;
+ }
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-// test result() and destroy
-{
- bool caught = false;
- try {
- createExceptionResultFuture().result();
- } catch (Exception &) {
- caught = true;
+ // test result() and destroy
+ {
+ bool caught = false;
+ try {
+ createExceptionResultFuture().result();
+ } catch (Exception &) {
+ caught = true;
+ }
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-// test results()
-{
- QFuture<int> f = createExceptionResultFuture();
- bool caught = false;
- try {
- f.results();
- } catch (Exception &) {
- caught = true;
+ // test results()
+ {
+ QFuture<int> f = createExceptionResultFuture();
+ bool caught = false;
+ try {
+ f.results();
+ } catch (Exception &) {
+ caught = true;
+ }
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-// test foreach
-{
- QFuture<int> f = createExceptionResultFuture();
- bool caught = false;
- try {
- foreach (int e, f.results()) {
- Q_UNUSED(e);
- QFAIL("did not get exception");
+ // test foreach
+ {
+ QFuture<int> f = createExceptionResultFuture();
+ bool caught = false;
+ try {
+ foreach (int e, f.results()) {
+ Q_UNUSED(e);
+ QFAIL("did not get exception");
+ }
+ } catch (Exception &) {
+ caught = true;
}
- } catch (Exception &) {
- caught = true;
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-// catch derived exceptions
-{
- bool caught = false;
- try {
- createDerivedExceptionFuture().waitForFinished();
- } catch (Exception &) {
- caught = true;
+ // catch derived exceptions
+ {
+ bool caught = false;
+ try {
+ createDerivedExceptionFuture().waitForFinished();
+ } catch (Exception &) {
+ caught = true;
+ }
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-{
- bool caught = false;
- try {
- createDerivedExceptionFuture().waitForFinished();
- } catch (DerivedException &) {
- caught = true;
+ {
+ bool caught = false;
+ try {
+ createDerivedExceptionFuture().waitForFinished();
+ } catch (DerivedException &) {
+ caught = true;
+ }
+ QVERIFY(caught);
}
- QVERIFY(caught);
-}
-
}