[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [clazy] tests/qstring-uneeded-heap-allocations: qstring-uneeded-heap-allocations: More unit-tests
From:       Sergio Martins <smartins () kde ! org>
Date:       2015-11-04 18:45:15
Message-ID: E1Zu33b-0000O0-L5 () scm ! kde ! org
[Download RAW message or body]

Git commit 23e71cca8c59de299ba8c8d192251ca7cea5357c by Sergio Martins.
Committed on 04/11/2015 at 18:45.
Pushed by smartins into branch 'master'.

qstring-uneeded-heap-allocations: More unit-tests

M  +6    -0    tests/qstring-uneeded-heap-allocations/fixed_main.expected
M  +5    -0    tests/qstring-uneeded-heap-allocations/main.cpp
M  +5    -0    tests/qstring-uneeded-heap-allocations/test.expected

http://commits.kde.org/clazy/23e71cca8c59de299ba8c8d192251ca7cea5357c

diff --git a/tests/qstring-uneeded-heap-allocations/fixed_main.expected \
b/tests/qstring-uneeded-heap-allocations/fixed_main.expected index efbfb1e..c8e69ce \
                100644
--- a/tests/qstring-uneeded-heap-allocations/fixed_main.expected
+++ b/tests/qstring-uneeded-heap-allocations/fixed_main.expected
@@ -177,4 +177,10 @@ void TestCharsets::test2()
     QString s2 = QStringLiteral("é");
     s2 += QLatin1String("é");
     s2 += QStringLiteral("é");
+    s = QStringLiteral("á");
+    s += QStringLiteral("á");
+    QStringLiteral("á");
+    QStringList slist;
+    slist << QStringLiteral("á") << QStringLiteral("a");
+    s += true ? "á" : "á";
 }
diff --git a/tests/qstring-uneeded-heap-allocations/main.cpp \
b/tests/qstring-uneeded-heap-allocations/main.cpp index 3554f58..abdfc28 100644
--- a/tests/qstring-uneeded-heap-allocations/main.cpp
+++ b/tests/qstring-uneeded-heap-allocations/main.cpp
@@ -177,4 +177,9 @@ void TestCharsets::test2()
     QString s2 = QString::fromUtf8("é");
     s2 += QString::fromLatin1("é");
     s2 += QString::fromUtf8("é");
+    s = "á";
+    s += "á";
+    QString("á");
+    QStringList slist;
+    slist << "á" << "a";
 }
diff --git a/tests/qstring-uneeded-heap-allocations/test.expected \
b/tests/qstring-uneeded-heap-allocations/test.expected index d887acd..31cd462 100644
--- a/tests/qstring-uneeded-heap-allocations/test.expected
+++ b/tests/qstring-uneeded-heap-allocations/test.expected
@@ -55,3 +55,8 @@ main.cpp:176:17: warning: QString::fromLatin1() being passed a \
literal [-Wclazy-  main.cpp:177:18: warning: QString::fromUtf8() being passed a \
literal [-Wclazy-qstring-uneeded-heap-allocations]  main.cpp:178:11: warning: \
QString::fromLatin1() being passed a literal \
[-Wclazy-qstring-uneeded-heap-allocations]  main.cpp:179:11: warning: \
QString::fromUtf8() being passed a literal [-Wclazy-qstring-uneeded-heap-allocations] \
+main.cpp:180:5: warning: QString(const char*) being called \
[-Wclazy-qstring-uneeded-heap-allocations] +main.cpp:181:5: warning: QString(const \
char*) being called [-Wclazy-qstring-uneeded-heap-allocations] +main.cpp:182:5: \
warning: QString(const char*) being called [-Wclazy-qstring-uneeded-heap-allocations] \
+main.cpp:184:14: warning: QString(const char*) being called \
[-Wclazy-qstring-uneeded-heap-allocations] +main.cpp:184:22: warning: QString(const \
char*) being called [-Wclazy-qstring-uneeded-heap-allocations]


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic