summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp')
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index deb983c262..b6dcd3ed63 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -356,17 +356,18 @@ void tst_QTextCodec::codecForLocale()
break;
}
}
- if (!codec2) {
- QSKIP("Could not find a codec that is not already the codecForLocale()");
- }
- // set it, codecForLocale() should return it now
- QTextCodec::setCodecForLocale(codec2);
- QCOMPARE(QTextCodec::codecForLocale(), codec2);
+ // Only run the rest of the test if we could find a codec that is not
+ // already the codecForLocale().
+ if (codec2) {
+ // set it, codecForLocale() should return it now
+ QTextCodec::setCodecForLocale(codec2);
+ QCOMPARE(QTextCodec::codecForLocale(), codec2);
- // reset back to the default
- QTextCodec::setCodecForLocale(0);
- QCOMPARE(QTextCodec::codecForLocale(), codec);
+ // reset back to the default
+ QTextCodec::setCodecForLocale(0);
+ QCOMPARE(QTextCodec::codecForLocale(), codec);
+ }
#endif
}