mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-05 04:35:56 -07:00
parent
b74b334e34
commit
882da47609
3 changed files with 31 additions and 31 deletions
|
@ -44,25 +44,25 @@ public:
|
|||
private slots:
|
||||
void testConstructors() const
|
||||
{
|
||||
QVERIFY(Path(u""_s) == Path(std::string("")));
|
||||
QVERIFY(Path(u"abc"_s) == Path(std::string("abc")));
|
||||
QVERIFY(Path(u"/abc"_s) == Path(std::string("/abc")));
|
||||
QVERIFY(Path(uR"(\abc)"_s) == Path(std::string(R"(\abc)")));
|
||||
QCOMPARE_EQ(Path(u""_s), Path(std::string("")));
|
||||
QCOMPARE_EQ(Path(u"abc"_s), Path(std::string("abc")));
|
||||
QCOMPARE_EQ(Path(u"/abc"_s), Path(std::string("/abc")));
|
||||
QCOMPARE_EQ(Path(uR"(\abc)"_s), Path(std::string(R"(\abc)")));
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QVERIFY(Path(uR"(c:)"_s) == Path(std::string(R"(c:)")));
|
||||
QVERIFY(Path(uR"(c:/)"_s) == Path(std::string(R"(c:/)")));
|
||||
QVERIFY(Path(uR"(c:/)"_s) == Path(std::string(R"(c:\)")));
|
||||
QVERIFY(Path(uR"(c:\)"_s) == Path(std::string(R"(c:/)")));
|
||||
QVERIFY(Path(uR"(c:\)"_s) == Path(std::string(R"(c:\)")));
|
||||
QCOMPARE_EQ(Path(uR"(c:)"_s), Path(std::string(R"(c:)")));
|
||||
QCOMPARE_EQ(Path(uR"(c:/)"_s), Path(std::string(R"(c:/)")));
|
||||
QCOMPARE_EQ(Path(uR"(c:/)"_s), Path(std::string(R"(c:\)")));
|
||||
QCOMPARE_EQ(Path(uR"(c:\)"_s), Path(std::string(R"(c:/)")));
|
||||
QCOMPARE_EQ(Path(uR"(c:\)"_s), Path(std::string(R"(c:\)")));
|
||||
|
||||
QVERIFY(Path(uR"(\\?\C:)"_s) == Path(std::string(R"(\\?\C:)")));
|
||||
QVERIFY(Path(uR"(\\?\C:/)"_s) == Path(std::string(R"(\\?\C:/)")));
|
||||
QVERIFY(Path(uR"(\\?\C:/)"_s) == Path(std::string(R"(\\?\C:\)")));
|
||||
QVERIFY(Path(uR"(\\?\C:\)"_s) == Path(std::string(R"(\\?\C:/)")));
|
||||
QVERIFY(Path(uR"(\\?\C:\)"_s) == Path(std::string(R"(\\?\C:\)")));
|
||||
QCOMPARE_EQ(Path(uR"(\\?\C:)"_s), Path(std::string(R"(\\?\C:)")));
|
||||
QCOMPARE_EQ(Path(uR"(\\?\C:/)"_s), Path(std::string(R"(\\?\C:/)")));
|
||||
QCOMPARE_EQ(Path(uR"(\\?\C:/)"_s), Path(std::string(R"(\\?\C:\)")));
|
||||
QCOMPARE_EQ(Path(uR"(\\?\C:\)"_s), Path(std::string(R"(\\?\C:/)")));
|
||||
QCOMPARE_EQ(Path(uR"(\\?\C:\)"_s), Path(std::string(R"(\\?\C:\)")));
|
||||
|
||||
QVERIFY(Path(uR"(\\?\C:\abc)"_s) == Path(std::string(R"(\\?\C:\abc)")));
|
||||
QCOMPARE_EQ(Path(uR"(\\?\C:\abc)"_s), Path(std::string(R"(\\?\C:\abc)")));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ private slots:
|
|||
bool ok = false;
|
||||
const QByteArray compressedData = Utils::Gzip::compress(data, 6, &ok);
|
||||
QVERIFY(ok);
|
||||
QVERIFY(compressedData != data);
|
||||
QCOMPARE_NE(compressedData, data);
|
||||
|
||||
ok = false;
|
||||
const QByteArray decompressedData = Utils::Gzip::decompress(compressedData, &ok);
|
||||
|
|
|
@ -169,26 +169,26 @@ private slots:
|
|||
{
|
||||
using ThreeDigits = Utils::Version<3>;
|
||||
|
||||
QVERIFY(ThreeDigits() == ThreeDigits());
|
||||
QCOMPARE_EQ(ThreeDigits(), ThreeDigits());
|
||||
QVERIFY(!(ThreeDigits() != ThreeDigits()));
|
||||
QVERIFY(ThreeDigits() <= ThreeDigits());
|
||||
QVERIFY(ThreeDigits() >= ThreeDigits());
|
||||
QCOMPARE_LE(ThreeDigits(), ThreeDigits());
|
||||
QCOMPARE_GE(ThreeDigits(), ThreeDigits());
|
||||
|
||||
QVERIFY(ThreeDigits() != ThreeDigits(1, 2, 3));
|
||||
QVERIFY(ThreeDigits() < ThreeDigits(1, 2, 3));
|
||||
QVERIFY(ThreeDigits() <= ThreeDigits(1, 2, 3));
|
||||
QCOMPARE_NE(ThreeDigits(), ThreeDigits(1, 2, 3));
|
||||
QCOMPARE_LT(ThreeDigits(), ThreeDigits(1, 2, 3));
|
||||
QCOMPARE_LE(ThreeDigits(), ThreeDigits(1, 2, 3));
|
||||
|
||||
QVERIFY(ThreeDigits(1, 2, 3) != ThreeDigits());
|
||||
QVERIFY(ThreeDigits(1, 2, 3) > ThreeDigits());
|
||||
QVERIFY(ThreeDigits(1, 2, 3) >= ThreeDigits());
|
||||
QCOMPARE_NE(ThreeDigits(1, 2, 3), ThreeDigits());
|
||||
QCOMPARE_GT(ThreeDigits(1, 2, 3), ThreeDigits());
|
||||
QCOMPARE_GE(ThreeDigits(1, 2, 3), ThreeDigits());
|
||||
|
||||
QVERIFY(ThreeDigits(1, 3, 3) != ThreeDigits(2, 2, 3));
|
||||
QVERIFY(ThreeDigits(1, 3, 3) < ThreeDigits(2, 2, 3));
|
||||
QVERIFY(ThreeDigits(1, 3, 3) <= ThreeDigits(2, 2, 3));
|
||||
QCOMPARE_NE(ThreeDigits(1, 3, 3), ThreeDigits(2, 2, 3));
|
||||
QCOMPARE_LT(ThreeDigits(1, 3, 3), ThreeDigits(2, 2, 3));
|
||||
QCOMPARE_LE(ThreeDigits(1, 3, 3), ThreeDigits(2, 2, 3));
|
||||
|
||||
QVERIFY(ThreeDigits(1, 2, 3) != ThreeDigits(1, 2, 4));
|
||||
QVERIFY(ThreeDigits(1, 2, 3) < ThreeDigits(1, 2, 4));
|
||||
QVERIFY(ThreeDigits(1, 2, 3) <= ThreeDigits(1, 2, 4));
|
||||
QCOMPARE_NE(ThreeDigits(1, 2, 3), ThreeDigits(1, 2, 4));
|
||||
QCOMPARE_LT(ThreeDigits(1, 2, 3), ThreeDigits(1, 2, 4));
|
||||
QCOMPARE_LE(ThreeDigits(1, 2, 3), ThreeDigits(1, 2, 4));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue