[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:47:06 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8bc963a6c41313b6db38f1128c1280c3dd482bc5
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 25 17:16:20 2001 +0000
Adding qstring-test to the list of tests
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/tests/qt/Makefile.in b/WebCore/kwq/tests/qt/Makefile.in
index b0eb9fd..d0836c9 100644
--- a/WebCore/kwq/tests/qt/Makefile.in
+++ b/WebCore/kwq/tests/qt/Makefile.in
@@ -35,6 +35,7 @@ PROGRAMS = \
qstack-test \
qregexp-test \
qchar-test \
+ qstring-test \
qdate-test \
qtime-test \
qdatetime-test \
@@ -116,6 +117,9 @@ qregexp-test: qregexp-test.o
qchar-test: qchar-test.o
$(CXX) -o $@ $< $(LDFLAGS)
+qstring-test: qstring-test.o
+ $(CXX) -o $@ $< $(LDFLAGS)
+
qdate-test: qdate-test.o
$(CXX) -o $@ $< $(LDFLAGS)
diff --git a/WebCore/kwq/tests/qt/qstring-test.chk b/WebCore/kwq/tests/qt/qstring-test.chk
new file mode 100644
index 0000000..b57123e
--- /dev/null
+++ b/WebCore/kwq/tests/qt/qstring-test.chk
@@ -0,0 +1,35 @@
+t
+t
+eeeee
+test
+this is a string
+test
+yet another string
+hello there
+e
+aÿû e
+1
+0
+1
+0
+18
+this is
+ttttt
+12
+2
+12
+12
+12
+7
+7
+12
+7
+7
+3
+3
+3
+3
+3
+blah
+blah
+blah
diff --git a/WebCore/kwq/tests/qt/qstring-test.cpp b/WebCore/kwq/tests/qt/qstring-test.cpp
new file mode 100644
index 0000000..f94b439
--- /dev/null
+++ b/WebCore/kwq/tests/qt/qstring-test.cpp
@@ -0,0 +1,83 @@
+#include <iostream>
+#include <qstring.h>
+#include <qregexp.h>
+
+int main() {
+
+ QChar c[4];
+ QByteArray ba = QByteArray(5);
+ ba.fill('e', -1);
+ QCString qcs = QCString("hello there");
+ char ch='a';
+
+ c[0] = QChar('t');
+ c[1] = QChar('e');
+ c[2] = QChar('s');
+ c[3] = QChar('t');
+
+ QString s0 = QString();
+ QString s1 = QString(c[0]);
+ QString s2 = QString(s1);
+ QString s3 = QString(ba);
+ QString s4 = QString(c, 4);
+ QString s5 = QString("this is a string");
+ QString s6 = s4;
+ QString s7 = "yet another string";
+ QString s8 = qcs;
+ QString s9 = c[1];
+ QString s10 = &ch;
+
+ cout << s1 << endl;
+ cout << s2 << endl;
+ cout << s3 << endl;
+ cout << s4 << endl;
+ cout << s5 << endl;
+ cout << s6 << endl;
+ cout << s7 << endl;
+ cout << s8 << endl;
+ cout << s9 << endl;
+ cout << s10 << endl;
+
+ QString s11 = QString(""); // make an empty string
+
+ cout << s0.isNull() << endl;
+ cout << s5.isNull() << endl;
+ cout << s11.isEmpty() << endl;
+ cout << s5.isEmpty() << endl;
+ cout << s7.length() << endl;
+
+ s5.truncate(8);
+ cout << s5 << endl;
+
+ s0.fill(c[3], 5);
+ cout << s0 << endl;
+
+ QRegExp qre = QRegExp(s1, TRUE, FALSE);
+ QString s12 = QString("string");
+ QString s13 = QString("blah blah blah");
+ QString s14 = QString("blah");
+ char blah[4];
+ strcpy(blah, "blah");
+
+ cout << s7.find(c[2], 0, FALSE) << endl; // find functions
+ cout << s7.find(qre, 0) << endl;
+ cout << s7.find(s12, 0, TRUE) << endl;
+ cout << s7.find("string", 0) << endl;
+ cout << s7.find("string", 0, TRUE) << endl;
+ cout << s7.findRev(c[0], 10, TRUE) << endl;
+ cout << s7.findRev(qre, 10) << endl;
+ cout << s7.findRev(s12, -1, TRUE) << endl;
+ cout << s7.findRev('t', 10) << endl;
+ cout << s7.findRev('t', 10, TRUE) << endl;
+
+ cout << s7.contains(c[0], TRUE) << endl;
+ cout << s7.contains(qre) << endl;
+ cout << s13.contains(s14, TRUE) << endl;
+ cout << s13.contains('b', TRUE) << endl;
+ cout << s13.contains(blah, TRUE) << endl;
+
+ cout << s13.left(4) << endl;
+ cout << s13.right(4) << endl;
+ cout << s13.mid(5,4) << endl;
+ return 0;
+}
diff --git a/WebCore/kwq/tests/test.list b/WebCore/kwq/tests/test.list
index fbf3819..9a2f3ee 100644
--- a/WebCore/kwq/tests/test.list
+++ b/WebCore/kwq/tests/test.list
@@ -16,3 +16,4 @@ qt/qchar-test
qt/qdate-test
qt/qtime-test
qt/qdatetime-test
+qt/qstring-test
diff --git a/WebCore/src/kwq/tests/qt/Makefile.in b/WebCore/src/kwq/tests/qt/Makefile.in
index b0eb9fd..d0836c9 100644
--- a/WebCore/src/kwq/tests/qt/Makefile.in
+++ b/WebCore/src/kwq/tests/qt/Makefile.in
@@ -35,6 +35,7 @@ PROGRAMS = \
qstack-test \
qregexp-test \
qchar-test \
+ qstring-test \
qdate-test \
qtime-test \
qdatetime-test \
@@ -116,6 +117,9 @@ qregexp-test: qregexp-test.o
qchar-test: qchar-test.o
$(CXX) -o $@ $< $(LDFLAGS)
+qstring-test: qstring-test.o
+ $(CXX) -o $@ $< $(LDFLAGS)
+
qdate-test: qdate-test.o
$(CXX) -o $@ $< $(LDFLAGS)
diff --git a/WebCore/src/kwq/tests/qt/qstring-test.chk b/WebCore/src/kwq/tests/qt/qstring-test.chk
new file mode 100644
index 0000000..b57123e
--- /dev/null
+++ b/WebCore/src/kwq/tests/qt/qstring-test.chk
@@ -0,0 +1,35 @@
+t
+t
+eeeee
+test
+this is a string
+test
+yet another string
+hello there
+e
+aÿû e
+1
+0
+1
+0
+18
+this is
+ttttt
+12
+2
+12
+12
+12
+7
+7
+12
+7
+7
+3
+3
+3
+3
+3
+blah
+blah
+blah
diff --git a/WebCore/src/kwq/tests/qt/qstring-test.cpp b/WebCore/src/kwq/tests/qt/qstring-test.cpp
new file mode 100644
index 0000000..f94b439
--- /dev/null
+++ b/WebCore/src/kwq/tests/qt/qstring-test.cpp
@@ -0,0 +1,83 @@
+#include <iostream>
+#include <qstring.h>
+#include <qregexp.h>
+
+int main() {
+
+ QChar c[4];
+ QByteArray ba = QByteArray(5);
+ ba.fill('e', -1);
+ QCString qcs = QCString("hello there");
+ char ch='a';
+
+ c[0] = QChar('t');
+ c[1] = QChar('e');
+ c[2] = QChar('s');
+ c[3] = QChar('t');
+
+ QString s0 = QString();
+ QString s1 = QString(c[0]);
+ QString s2 = QString(s1);
+ QString s3 = QString(ba);
+ QString s4 = QString(c, 4);
+ QString s5 = QString("this is a string");
+ QString s6 = s4;
+ QString s7 = "yet another string";
+ QString s8 = qcs;
+ QString s9 = c[1];
+ QString s10 = &ch;
+
+ cout << s1 << endl;
+ cout << s2 << endl;
+ cout << s3 << endl;
+ cout << s4 << endl;
+ cout << s5 << endl;
+ cout << s6 << endl;
+ cout << s7 << endl;
+ cout << s8 << endl;
+ cout << s9 << endl;
+ cout << s10 << endl;
+
+ QString s11 = QString(""); // make an empty string
+
+ cout << s0.isNull() << endl;
+ cout << s5.isNull() << endl;
+ cout << s11.isEmpty() << endl;
+ cout << s5.isEmpty() << endl;
+ cout << s7.length() << endl;
+
+ s5.truncate(8);
+ cout << s5 << endl;
+
+ s0.fill(c[3], 5);
+ cout << s0 << endl;
+
+ QRegExp qre = QRegExp(s1, TRUE, FALSE);
+ QString s12 = QString("string");
+ QString s13 = QString("blah blah blah");
+ QString s14 = QString("blah");
+ char blah[4];
+ strcpy(blah, "blah");
+
+ cout << s7.find(c[2], 0, FALSE) << endl; // find functions
+ cout << s7.find(qre, 0) << endl;
+ cout << s7.find(s12, 0, TRUE) << endl;
+ cout << s7.find("string", 0) << endl;
+ cout << s7.find("string", 0, TRUE) << endl;
+ cout << s7.findRev(c[0], 10, TRUE) << endl;
+ cout << s7.findRev(qre, 10) << endl;
+ cout << s7.findRev(s12, -1, TRUE) << endl;
+ cout << s7.findRev('t', 10) << endl;
+ cout << s7.findRev('t', 10, TRUE) << endl;
+
+ cout << s7.contains(c[0], TRUE) << endl;
+ cout << s7.contains(qre) << endl;
+ cout << s13.contains(s14, TRUE) << endl;
+ cout << s13.contains('b', TRUE) << endl;
+ cout << s13.contains(blah, TRUE) << endl;
+
+ cout << s13.left(4) << endl;
+ cout << s13.right(4) << endl;
+ cout << s13.mid(5,4) << endl;
+ return 0;
+}
diff --git a/WebCore/src/kwq/tests/test.list b/WebCore/src/kwq/tests/test.list
index fbf3819..9a2f3ee 100644
--- a/WebCore/src/kwq/tests/test.list
+++ b/WebCore/src/kwq/tests/test.list
@@ -16,3 +16,4 @@ qt/qchar-test
qt/qdate-test
qt/qtime-test
qt/qdatetime-test
+qt/qstring-test
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list