Revert "Add tests for QCollatorSortKey"
This reverts commit b0c1e07d64.
The unit tests it introduced trigger errors with the macOS and
Win32 implementations, which means the there's something seriously
wrong with either the API, our implementation or the tests.
Revert for now until this gets fixed. Blacklisting was also the
wrong tool to use. The tests should have used QEXPECT_FAIL.
Change-Id: Ida20c6bbe0c019835a22464535029585e8e1e367
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
b0c1e07d64
commit
b1b53b7101
|
|
@ -1,18 +0,0 @@
|
|||
[compare:swedish5]
|
||||
osx
|
||||
[compare:norwegian4]
|
||||
osx
|
||||
[compare:german6]
|
||||
osx
|
||||
windows
|
||||
[compare:german7]
|
||||
osx
|
||||
windows
|
||||
[compare:german8]
|
||||
osx
|
||||
[compare:german9]
|
||||
osx
|
||||
[compare:german10]
|
||||
osx
|
||||
[compare:french5]
|
||||
osx
|
||||
|
|
@ -33,11 +33,6 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
Q_CONSTEXPR inline int sign(int i) Q_DECL_NOTHROW
|
||||
{ return i < 0 ? -1 : i > 0 ? 1 : 0; }
|
||||
|
||||
#define QCOMPARE_SIGN(x, y) QCOMPARE(sign(x), sign(y))
|
||||
|
||||
class tst_QCollator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -178,28 +173,9 @@ void tst_QCollator::compare()
|
|||
if (numericMode)
|
||||
collator.setNumericMode(true);
|
||||
|
||||
QCOMPARE_SIGN(collator.compare(s1, s2), result);
|
||||
{
|
||||
const auto s1sk = collator.sortKey(s1);
|
||||
const auto s2sk = collator.sortKey(s2);
|
||||
|
||||
QCOMPARE_SIGN(s1sk.compare(s2sk), result);
|
||||
#define CHECK(op) QCOMPARE(s1sk op s2sk, result op 0)
|
||||
CHECK(<);
|
||||
#undef CHECK
|
||||
}
|
||||
|
||||
QCOMPARE(collator.compare(s1, s2), result);
|
||||
collator.setCaseSensitivity(Qt::CaseInsensitive);
|
||||
QCOMPARE_SIGN(collator.compare(s1, s2), caseInsensitiveResult);
|
||||
{
|
||||
const auto s1sk = collator.sortKey(s1);
|
||||
const auto s2sk = collator.sortKey(s2);
|
||||
|
||||
QCOMPARE_SIGN(s1sk.compare(s2sk), caseInsensitiveResult);
|
||||
#define CHECK(op) QCOMPARE(s1sk op s2sk, caseInsensitiveResult op 0)
|
||||
CHECK(<);
|
||||
#undef CHECK
|
||||
}
|
||||
QCOMPARE(collator.compare(s1, s2), caseInsensitiveResult);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue