summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2012-01-06 15:44:02 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-06 07:50:21 +0100
commitdb0361e9b1d6e9dc83e3b47842508ab45e32245d (patch)
treef240d080873d7699dce60026bfbaa1c869a9ae73 /tests/auto/corelib
parente6b9382ae2f6c8a6f83fa724168af467eed073cf (diff)
Remove redundant class from QStringMatcher test.
The removed class was evidently attempting to promote protected members of its base class to public, but the way this was done doesn't work and doing so wasn't actually necessary for the test. Change-Id: I15e0c31891da08cacee1054e15596a79a058b466 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
index 8b23fa6efd..10906902ff 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
@@ -56,15 +56,9 @@ private slots:
void assignOperator();
};
-// Subclass that exposes the protected functions.
-class SubQStringMatcher : public QStringMatcher
-{
-public:
-};
-
void tst_QStringMatcher::qstringmatcher()
{
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
QCOMPARE(matcher.indexIn("foo", 1), 1);
QCOMPARE(matcher.pattern(), QString());
@@ -73,7 +67,7 @@ void tst_QStringMatcher::qstringmatcher()
// public Qt::CaseSensitivity caseSensitivity() const
void tst_QStringMatcher::caseSensitivity()
{
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setCaseSensitivity(Qt::CaseSensitive);
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
@@ -106,7 +100,7 @@ void tst_QStringMatcher::indexIn()
QFETCH(int, from);
QFETCH(int, indexIn);
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setPattern(needle);
QCOMPARE(matcher.indexIn(haystack, from), indexIn);
@@ -133,7 +127,7 @@ void tst_QStringMatcher::setCaseSensitivity()
QFETCH(int, indexIn);
QFETCH(int, cs);
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setPattern(needle);
matcher.setCaseSensitivity(static_cast<Qt::CaseSensitivity> (cs));