mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Partially revert "Remove unused stringutils methods"
This partially reverts commit 0c1a5a5c97.
This commit is contained in:
@@ -33,6 +33,7 @@ namespace BlackMiscTest
|
||||
void testRemove();
|
||||
void testContains();
|
||||
void testIndexOf();
|
||||
void testSplit();
|
||||
void testTimestampParsing();
|
||||
void testCodecs();
|
||||
void testSimplify();
|
||||
@@ -60,6 +61,16 @@ namespace BlackMiscTest
|
||||
QVERIFY2(indexOfChar(s, [](QChar c) { return c.isNumber(); }) == -1, "Test not index of character by predicate");
|
||||
}
|
||||
|
||||
void CTestStringUtils::testSplit()
|
||||
{
|
||||
const QString s = "line one\nline two\r\nline three\n";
|
||||
QStringList lines = splitLines(s);
|
||||
QVERIFY2(lines.size() == 3, "Test split string into lines: correct number of lines");
|
||||
QVERIFY2(lines[0] == "line one", "Test split string into lines: correct first line");
|
||||
QVERIFY2(lines[1] == "line two", "Test split string into lines: correct second line");
|
||||
QVERIFY2(lines[2] == "line three", "Test split string into lines: correct third line");
|
||||
}
|
||||
|
||||
void CTestStringUtils::testTimestampParsing()
|
||||
{
|
||||
const QStringList dts(
|
||||
|
||||
Reference in New Issue
Block a user