[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:38 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 98c9e67d8dd4c55b290365e3e792d3116926b1f5
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 27 20:57:38 2001 +0000

    Adding remaining functions to qcstring-test. Cleaned up output.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@212 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/tests/qt/qcstring-test.chk b/WebCore/kwq/tests/qt/qcstring-test.chk
index 967d330..1386d1f 100644
--- a/WebCore/kwq/tests/qt/qcstring-test.chk
+++ b/WebCore/kwq/tests/qt/qcstring-test.chk
@@ -1,12 +1,36 @@
-this is a string
-this is another string
-jazz hype loves two mugs for dire quixotic knobs
-(null)
-this is a string
-upper case: THIS IS A STRING
-lower case: this is a string
-left four chars: jazz
-right five chars: knobs
-jazz hype loves
-jazz hype loves two mugs for dire quixotic knobs
-should be non-zero: 1
+s0: 
+s1: 
+s2: this is a string
+s3: this is anothe
+s4: jazz hype loves two mugs for dire quixotic knobs
+s5: 
+s6: 
+s6 isEmpty: 1
+s4 isEmpty: 0
+s4 isNull: 0
+s0 isNull: 1
+s6 isNull: 0
+s7 lower: this was a sentence in all uppercase
+s8: I'm going to do a find on this sentence
+s8 find "this": 26
+s8 contains "o": 4
+s9: I'm going to get the length of this string
+s9 length: 42
+s10: I'm going to truncate this string to 15 characters
+s10 truncate 15: I'm going to tr
+s11: I'm going get 15 characters out of this string starting at position 10
+s11 mid 10-25: to tr
+s12: Have a good 
+s12 +=: Have a good night
+s12 +=: Have a good night!
+s13: This is a sentence
+ch1: This is a sentence
+ch2: This is another sentence
+ch1 == s13: 1
+s13 == ch1: 1
+ch2 == s13: 0
+s13 == ch2: 0
+ch1 != s13: 0
+s13 != ch1: 0
+ch2 != s13: 1
+s13 != ch2: 1
diff --git a/WebCore/kwq/tests/qt/qcstring-test.cpp b/WebCore/kwq/tests/qt/qcstring-test.cpp
index e473402..b07f50e 100644
--- a/WebCore/kwq/tests/qt/qcstring-test.cpp
+++ b/WebCore/kwq/tests/qt/qcstring-test.cpp
@@ -4,32 +4,72 @@
 
 int main() {
 
-    QCString s1 = "this is a string";
-    QCString s2 = "this is another string";
-    QCString s3 = "jazz hype loves two mugs for dire quixotic knobs";
-    QCString s4; 
+    QCString s0 = QCString();
+    QCString s1 = QCString(10);
+    QCString s2 = QCString("this is a string");
+    QCString s3 = QCString("this is another string", 15);
+    QCString s4 = "jazz hype loves two mugs for dire quixotic knobs";
     QCString s5 = s1; 
+    QCString s6 = "";
+    
+    cout << "s0: " << s6 << endl;
+    cout << "s1: " << s1 << endl;
+    cout << "s2: " << s2 << endl;
+    cout << "s3: " << s3 << endl;
+    cout << "s4: " << s4 << endl;
+    cout << "s5: " << s5 << endl;
+    cout << "s6: " << s6 << endl;
+    
+    cout << "s6 isEmpty: " << s6.isEmpty() << endl;
+    cout << "s4 isEmpty: " << s4.isEmpty() << endl;
+    
+    cout << "s4 isNull: " << s4.isNull() << endl;
+    cout << "s0 isNull: " << s0.isNull() << endl;
+    cout << "s6 isNull: " << s6.isNull() << endl;
+    
+    QCString s7 = "THIS WAS A SENTENCE IN ALL UPPERCASE";
+    cout << "s7 lower: " << s7.lower() << endl;
 
-    cout << s1 << endl;
-    cout << s2 << endl;
-    cout << s3 << endl;
-    cout << s4 << endl;
-    cout << s5 << endl;
+    QCString s8 = "I'm going to do a find on this sentence";
+    cout << "s8: " << s8 << endl;
+    cout << "s8 find \"this\": " << s8.find("this", 0, TRUE) << endl;
+    cout << "s8 contains \"o\": " << s8.contains('o', TRUE) << endl;
 
-    QCString s6 = s1.upper();
-    cout << "upper case: " << s6 << endl;
-    cout << "lower case: " << s6.lower() << endl;
-
-    cout << "left four chars: " << s3.left(4) << endl;
-    cout << "right five chars: " << s3.right(5) << endl;
-
-    s6 = s3;
-    s6.truncate(15);
-    cout << s6 << endl;
-
-    s6 += " two mugs for dire quixotic knobs";
-    cout << s6 << endl;
-    cout << "should be non-zero: " << (s3 == s6) << endl;
+    QCString s9 = "I'm going to get the length of this string";
+    cout << "s9: " << s9 << endl;
+    cout << "s9 length: " << s9.length() << endl;
+    
+    QCString s10 = "I'm going to truncate this string to 15 characters";
+    cout << "s10: " << s10 << endl;
+    s10.truncate(15);
+    cout << "s10 truncate 15: " << s10 << endl;
+    
+    QCString s11 = "I'm going get 15 characters out of this string starting at position 10";
+    cout << "s11: " << s11 << endl;
+    cout << "s11 mid 10-25: " << s10.mid(10, 15) << endl; // heh? Seems to return 10-15 instead of 10-25
+    
+    QCString s12 = "Have a good ";
+    cout << "s12: " << s12 << endl;
+    s12 += "night";
+    cout << "s12 +=: " << s12 << endl;
+    s12 += '!';
+    cout << "s12 +=: " << s12 << endl;
+    
+    QCString s13 = "This is a sentence";
+    char ch1[20], ch2[20]; 
+    strcpy(ch1, "This is a sentence");
+    strcpy(ch2, "This is another sentence");
+    cout << "s13: " << s13 << endl;
+    cout << "ch1: " << ch1 << endl;
+    cout << "ch2: " << ch2 << endl;
+    cout << "ch1 == s13: " << (ch1 == s13) << endl;
+    cout << "s13 == ch1: " << (s13 == ch1) << endl;
+    cout << "ch2 == s13: " << (ch2 == s13) << endl;
+    cout << "s13 == ch2: " << (s13 == ch2) << endl;
+    cout << "ch1 != s13: " << (ch1 != s13) << endl;
+    cout << "s13 != ch1: " << (s13 != ch1) << endl;
+    cout << "ch2 != s13: " << (ch2 != s13) << endl;
+    cout << "s13 != ch2: " << (s13 != ch2) << endl;    
 
     return 0;
 }
diff --git a/WebCore/src/kwq/tests/qt/qcstring-test.chk b/WebCore/src/kwq/tests/qt/qcstring-test.chk
index 967d330..1386d1f 100644
--- a/WebCore/src/kwq/tests/qt/qcstring-test.chk
+++ b/WebCore/src/kwq/tests/qt/qcstring-test.chk
@@ -1,12 +1,36 @@
-this is a string
-this is another string
-jazz hype loves two mugs for dire quixotic knobs
-(null)
-this is a string
-upper case: THIS IS A STRING
-lower case: this is a string
-left four chars: jazz
-right five chars: knobs
-jazz hype loves
-jazz hype loves two mugs for dire quixotic knobs
-should be non-zero: 1
+s0: 
+s1: 
+s2: this is a string
+s3: this is anothe
+s4: jazz hype loves two mugs for dire quixotic knobs
+s5: 
+s6: 
+s6 isEmpty: 1
+s4 isEmpty: 0
+s4 isNull: 0
+s0 isNull: 1
+s6 isNull: 0
+s7 lower: this was a sentence in all uppercase
+s8: I'm going to do a find on this sentence
+s8 find "this": 26
+s8 contains "o": 4
+s9: I'm going to get the length of this string
+s9 length: 42
+s10: I'm going to truncate this string to 15 characters
+s10 truncate 15: I'm going to tr
+s11: I'm going get 15 characters out of this string starting at position 10
+s11 mid 10-25: to tr
+s12: Have a good 
+s12 +=: Have a good night
+s12 +=: Have a good night!
+s13: This is a sentence
+ch1: This is a sentence
+ch2: This is another sentence
+ch1 == s13: 1
+s13 == ch1: 1
+ch2 == s13: 0
+s13 == ch2: 0
+ch1 != s13: 0
+s13 != ch1: 0
+ch2 != s13: 1
+s13 != ch2: 1
diff --git a/WebCore/src/kwq/tests/qt/qcstring-test.cpp b/WebCore/src/kwq/tests/qt/qcstring-test.cpp
index e473402..b07f50e 100644
--- a/WebCore/src/kwq/tests/qt/qcstring-test.cpp
+++ b/WebCore/src/kwq/tests/qt/qcstring-test.cpp
@@ -4,32 +4,72 @@
 
 int main() {
 
-    QCString s1 = "this is a string";
-    QCString s2 = "this is another string";
-    QCString s3 = "jazz hype loves two mugs for dire quixotic knobs";
-    QCString s4; 
+    QCString s0 = QCString();
+    QCString s1 = QCString(10);
+    QCString s2 = QCString("this is a string");
+    QCString s3 = QCString("this is another string", 15);
+    QCString s4 = "jazz hype loves two mugs for dire quixotic knobs";
     QCString s5 = s1; 
+    QCString s6 = "";
+    
+    cout << "s0: " << s6 << endl;
+    cout << "s1: " << s1 << endl;
+    cout << "s2: " << s2 << endl;
+    cout << "s3: " << s3 << endl;
+    cout << "s4: " << s4 << endl;
+    cout << "s5: " << s5 << endl;
+    cout << "s6: " << s6 << endl;
+    
+    cout << "s6 isEmpty: " << s6.isEmpty() << endl;
+    cout << "s4 isEmpty: " << s4.isEmpty() << endl;
+    
+    cout << "s4 isNull: " << s4.isNull() << endl;
+    cout << "s0 isNull: " << s0.isNull() << endl;
+    cout << "s6 isNull: " << s6.isNull() << endl;
+    
+    QCString s7 = "THIS WAS A SENTENCE IN ALL UPPERCASE";
+    cout << "s7 lower: " << s7.lower() << endl;
 
-    cout << s1 << endl;
-    cout << s2 << endl;
-    cout << s3 << endl;
-    cout << s4 << endl;
-    cout << s5 << endl;
+    QCString s8 = "I'm going to do a find on this sentence";
+    cout << "s8: " << s8 << endl;
+    cout << "s8 find \"this\": " << s8.find("this", 0, TRUE) << endl;
+    cout << "s8 contains \"o\": " << s8.contains('o', TRUE) << endl;
 
-    QCString s6 = s1.upper();
-    cout << "upper case: " << s6 << endl;
-    cout << "lower case: " << s6.lower() << endl;
-
-    cout << "left four chars: " << s3.left(4) << endl;
-    cout << "right five chars: " << s3.right(5) << endl;
-
-    s6 = s3;
-    s6.truncate(15);
-    cout << s6 << endl;
-
-    s6 += " two mugs for dire quixotic knobs";
-    cout << s6 << endl;
-    cout << "should be non-zero: " << (s3 == s6) << endl;
+    QCString s9 = "I'm going to get the length of this string";
+    cout << "s9: " << s9 << endl;
+    cout << "s9 length: " << s9.length() << endl;
+    
+    QCString s10 = "I'm going to truncate this string to 15 characters";
+    cout << "s10: " << s10 << endl;
+    s10.truncate(15);
+    cout << "s10 truncate 15: " << s10 << endl;
+    
+    QCString s11 = "I'm going get 15 characters out of this string starting at position 10";
+    cout << "s11: " << s11 << endl;
+    cout << "s11 mid 10-25: " << s10.mid(10, 15) << endl; // heh? Seems to return 10-15 instead of 10-25
+    
+    QCString s12 = "Have a good ";
+    cout << "s12: " << s12 << endl;
+    s12 += "night";
+    cout << "s12 +=: " << s12 << endl;
+    s12 += '!';
+    cout << "s12 +=: " << s12 << endl;
+    
+    QCString s13 = "This is a sentence";
+    char ch1[20], ch2[20]; 
+    strcpy(ch1, "This is a sentence");
+    strcpy(ch2, "This is another sentence");
+    cout << "s13: " << s13 << endl;
+    cout << "ch1: " << ch1 << endl;
+    cout << "ch2: " << ch2 << endl;
+    cout << "ch1 == s13: " << (ch1 == s13) << endl;
+    cout << "s13 == ch1: " << (s13 == ch1) << endl;
+    cout << "ch2 == s13: " << (ch2 == s13) << endl;
+    cout << "s13 == ch2: " << (s13 == ch2) << endl;
+    cout << "ch1 != s13: " << (ch1 != s13) << endl;
+    cout << "s13 != ch1: " << (s13 != ch1) << endl;
+    cout << "ch2 != s13: " << (ch2 != s13) << endl;
+    cout << "s13 != ch2: " << (s13 != ch2) << endl;    
 
     return 0;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list