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


The following commit has been merged in the debian/unstable branch:
commit 53cb7ce0b795c56e8599a551b73f9f15fa8713a2
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 24 02:18:44 2001 +0000

    Fixed qdatetime tests
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/tests/qt/qdate-test.chk b/WebCore/kwq/tests/qt/qdate-test.chk
index a3154ef..e9c79f1 100644
--- a/WebCore/kwq/tests/qt/qdate-test.chk
+++ b/WebCore/kwq/tests/qt/qdate-test.chk
@@ -1,2 +1,7 @@
 d1: QDate: [yy/mm/dd: 1999/12/31]
+d2: QDate: [yy/mm/dd: 2001/10/23]
 d0 = d1: QDate: [yy/mm/dd: 1999/12/31]
+d0.year(): 1999
+d0.month(): 12
+d0.day(): 31
+d1.daysTo(d2): 662
diff --git a/WebCore/kwq/tests/qt/qdate-test.cpp b/WebCore/kwq/tests/qt/qdate-test.cpp
index c545696..651e50b 100644
--- a/WebCore/kwq/tests/qt/qdate-test.cpp
+++ b/WebCore/kwq/tests/qt/qdate-test.cpp
@@ -9,39 +9,19 @@
 int main() {
 
     QDate d0;
-    QDate d1 = QDate(1999, 12, 31);
-    //QDate d2;
+    QDate d1(1999, 12, 31);
+    QDate d2(2001, 10, 23);
 
     cout << "d1: " << d1 << endl;
-
+    cout << "d2: " << d2 << endl;
+    
     d0 = d1;
     cout << "d0 = d1: " << d0 << endl;
-
-    //d0 = d1.addDays(1);
-    //cout << "y2k: " << d0 << endl;
-
-    //d1 = QDate(1900, 2, 28);
-    //d0 = d1.addDays(1);
-    //cout << "is not leap year: " << d0 << endl;
-
-    //d1 = QDate(2000, 2, 28);
-    //d0 = d1.addDays(1);
-    //cout << "is leap year: " << d0 << endl;
-
-    //cout << d1.monthName(d1.month()) << endl;
-
-    //d2 = d1;
-    //cout << "d0 is: " << d0 << endl;
-    //cout << "d1 is: " << d1 << endl;
-    //cout << "d2 is: " << d2 << endl;
-    //cout << "(d0 < d1): " << (d0 < d1) << endl;
-    //cout << "(d0 <= d1): " << (d0 <= d1) << endl;
-    //cout << "(d0 > d1): " << (d0 > d1) << endl;
-    //cout << "(d0 >= d1): " << (d0 >= d1) << endl;
-    //cout << "(d2 < d1): " << (d2 < d1) << endl;
-    //cout << "(d2 <= d1): " << (d2 <= d1) << endl;
-    //cout << "(d2 > d1): " << (d2 > d1) << endl;
-    //cout << "(d2 >= d1): " << (d2 >= d1) << endl;
+    
+    cout << "d0.year(): " << d0.year() << endl;
+    cout << "d0.month(): " << d0.month() << endl;
+    cout << "d0.day(): " << d0.day() << endl;
+    cout << "d1.daysTo(d2): " << d1.daysTo(d2) << endl;
     
     return 0;
 }
diff --git a/WebCore/kwq/tests/qt/qdatetime-test.chk b/WebCore/kwq/tests/qt/qdatetime-test.chk
index bd3f1a8..783834e 100644
--- a/WebCore/kwq/tests/qt/qdatetime-test.chk
+++ b/WebCore/kwq/tests/qt/qdatetime-test.chk
@@ -1,6 +1,6 @@
-dt1: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 0:0:0:0]
-dt2: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:59:999]
-dt3: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:59:999]
-dt0 = dt1: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 0:0:0:0]
+dt2: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:0:0]
+dt3: QDateTime: [yy/mm/dd hh:mm:ss:ms = 2000/12/31 23:59:0:0]
+dt4: QDateTime: [yy/mm/dd hh:mm:ss:ms = 2000/12/31 23:59:0:0]
+dt0=dt2: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:0:0]
 dt2 secsTo dt3: 31622400
-dt2 time: QTime: [hh:mm:ss:ms = 23:59:59:999]
\ No newline at end of file
+dt2 time: QTime: [hh:mm:ss:ms = 23:59:0:0]
diff --git a/WebCore/kwq/tests/qt/qdatetime-test.cpp b/WebCore/kwq/tests/qt/qdatetime-test.cpp
index 030d982..beb11f9 100644
--- a/WebCore/kwq/tests/qt/qdatetime-test.cpp
+++ b/WebCore/kwq/tests/qt/qdatetime-test.cpp
@@ -8,42 +8,28 @@
 
 int main() {
 
-    //QDate d0;
-    QDate d1 = QDate(1999, 12, 31);
-    QDate d2 = QDate(2000, 12, 31);
+    QDate d1(1999, 12, 31);
+    QDate d2(2000, 12, 31);
     
-    //QTime t0;
-    QTime t1 = QTime(23, 59, 59, 999);
-    QTime t2 = QTime(23, 59, 59, 999);
+    QTime t1(23, 59);
+    QTime t2(23, 59);
     
-    QDateTime dt0;    
-    QDateTime dt1 = QDateTime(d1);    
-    QDateTime dt2 = QDateTime(d1, t1);    
-    QDateTime dt3 = QDateTime(d2, t2);
-    
-    cout << "dt1: " << dt1 << endl;
+    QDateTime dt0;       
+    QDateTime dt2(d1, t1);    
+    QDateTime dt3(d2, t2);
+    QDateTime dt4(dt3);
+
     cout << "dt2: " << dt2 << endl;
-    cout << "dt3: " << dt2 << endl;
+    cout << "dt3: " << dt3 << endl;
+    cout << "dt4: " << dt4 << endl;
     
-    dt0 = dt1;
-    cout << "dt0 = dt1: " << dt0 << endl;
+    dt0 = dt2;
+    cout << "dt0=dt2: " << dt0 << endl;
     
     cout << "dt2 secsTo dt3: " << dt2.secsTo(dt3) << endl;
+    cout << "dt2 time: " << dt2.time() << endl;
     
-    cout << "dt2 time: " << dt2.time();
-    
-    //cout << "string: " << dt0.toString() << endl; 
-
-    //d0 = d1.addDays(1);
-    //dt0.setDate(d0);
-    //cout << "setDate: " << dt0 << endl;
-
-    //t0 = t1.addSecs(1);
-    //dt0.setTime(t0);
-    //cout << "setTime: " << dt0 << endl;
 
-    //dt0.setTime_t(1000000000);
-    //cout << "setTime_t: " << dt0 << endl;
 
     return 0;
 }
diff --git a/WebCore/kwq/tests/qt/qtime-test.chk b/WebCore/kwq/tests/qt/qtime-test.chk
index 9279581..8d0a9c2 100644
--- a/WebCore/kwq/tests/qt/qtime-test.chk
+++ b/WebCore/kwq/tests/qt/qtime-test.chk
@@ -1,7 +1,11 @@
-d1: QTime: [hh:mm:ss:ms = 23:59:59:999]
-d2: QTime: [hh:mm:ss:ms = 1:8:6:0]
+d1: QTime: [hh:mm:ss:ms = 23:59:0:0]
+d2: QTime: [hh:mm:ss:ms = 1:8:0:0]
 d0 isNull: 1
 d1 isNull: 0
-d0 = d1: QTime: [hh:mm:ss:ms = 23:59:59:999]
-d1 msec: 999
+d0 = d1: QTime: [hh:mm:ss:ms = 23:59:0:0]
+d1 msec: 0
 d2 msec: 0
+d2 hour: 1
+d2 minute: 8
+d2 second: 0
+d2 secsTo d1: 82260
diff --git a/WebCore/kwq/tests/qt/qtime-test.cpp b/WebCore/kwq/tests/qt/qtime-test.cpp
index ecfb3c2..ef22ac3 100644
--- a/WebCore/kwq/tests/qt/qtime-test.cpp
+++ b/WebCore/kwq/tests/qt/qtime-test.cpp
@@ -9,8 +9,8 @@
 int main() {
 
     QTime d0;
-    QTime d1 = QTime(23, 59, 59, 999);
-    QTime d2 = QTime(1, 8, 6, 0);
+    QTime d1(23, 59);
+    QTime d2(1, 8);
     QTime d3;
     int elapsedTime;
     
@@ -26,31 +26,16 @@ int main() {
     
     cout << "d1 msec: " << d1.msec() << endl;
     cout << "d2 msec: " << d2.msec() << endl;
+    cout << "d2 hour: " << d2.hour() << endl;
+    cout << "d2 minute: " << d2.minute() << endl;
+    cout << "d2 second: " << d2.second() << endl;
     
+    cout << "d2 secsTo d1: " << d2.secsTo(d1) << endl;
     
     elapsedTime = d3.elapsed(); // nothing is printed because output will never match .chk file
     elapsedTime = d3.restart();
     
     
-    //d0 = d1.addSecs(1);
-    //cout << "day roll (seconds): " << d0 << endl;
-
-    //d0 = d1;
-    //d0 = d1.addMSecs(1);
-    //cout << "day roll (milli-seconds): " << d0 << endl;
-
-    //d2 = d1;
-    //cout << "d0 is: " << d0 << endl;
-    //cout << "d1 is: " << d1 << endl;
-    //cout << "d2 is: " << d2 << endl;
-    //cout << "(d0 < d1): " << (d0 < d1) << endl;
-    //cout << "(d0 <= d1): " << (d0 <= d1) << endl;
-    //cout << "(d0 > d1): " << (d0 > d1) << endl;
-    //cout << "(d0 >= d1): " << (d0 >= d1) << endl;
-    //cout << "(d2 < d1): " << (d2 < d1) << endl;
-    //cout << "(d2 <= d1): " << (d2 <= d1) << endl;
-    //cout << "(d2 > d1): " << (d2 > d1) << endl;
-    //cout << "(d2 >= d1): " << (d2 >= d1) << endl;
     
     return 0;
 }
diff --git a/WebCore/src/kwq/tests/qt/qdate-test.chk b/WebCore/src/kwq/tests/qt/qdate-test.chk
index a3154ef..e9c79f1 100644
--- a/WebCore/src/kwq/tests/qt/qdate-test.chk
+++ b/WebCore/src/kwq/tests/qt/qdate-test.chk
@@ -1,2 +1,7 @@
 d1: QDate: [yy/mm/dd: 1999/12/31]
+d2: QDate: [yy/mm/dd: 2001/10/23]
 d0 = d1: QDate: [yy/mm/dd: 1999/12/31]
+d0.year(): 1999
+d0.month(): 12
+d0.day(): 31
+d1.daysTo(d2): 662
diff --git a/WebCore/src/kwq/tests/qt/qdate-test.cpp b/WebCore/src/kwq/tests/qt/qdate-test.cpp
index c545696..651e50b 100644
--- a/WebCore/src/kwq/tests/qt/qdate-test.cpp
+++ b/WebCore/src/kwq/tests/qt/qdate-test.cpp
@@ -9,39 +9,19 @@
 int main() {
 
     QDate d0;
-    QDate d1 = QDate(1999, 12, 31);
-    //QDate d2;
+    QDate d1(1999, 12, 31);
+    QDate d2(2001, 10, 23);
 
     cout << "d1: " << d1 << endl;
-
+    cout << "d2: " << d2 << endl;
+    
     d0 = d1;
     cout << "d0 = d1: " << d0 << endl;
-
-    //d0 = d1.addDays(1);
-    //cout << "y2k: " << d0 << endl;
-
-    //d1 = QDate(1900, 2, 28);
-    //d0 = d1.addDays(1);
-    //cout << "is not leap year: " << d0 << endl;
-
-    //d1 = QDate(2000, 2, 28);
-    //d0 = d1.addDays(1);
-    //cout << "is leap year: " << d0 << endl;
-
-    //cout << d1.monthName(d1.month()) << endl;
-
-    //d2 = d1;
-    //cout << "d0 is: " << d0 << endl;
-    //cout << "d1 is: " << d1 << endl;
-    //cout << "d2 is: " << d2 << endl;
-    //cout << "(d0 < d1): " << (d0 < d1) << endl;
-    //cout << "(d0 <= d1): " << (d0 <= d1) << endl;
-    //cout << "(d0 > d1): " << (d0 > d1) << endl;
-    //cout << "(d0 >= d1): " << (d0 >= d1) << endl;
-    //cout << "(d2 < d1): " << (d2 < d1) << endl;
-    //cout << "(d2 <= d1): " << (d2 <= d1) << endl;
-    //cout << "(d2 > d1): " << (d2 > d1) << endl;
-    //cout << "(d2 >= d1): " << (d2 >= d1) << endl;
+    
+    cout << "d0.year(): " << d0.year() << endl;
+    cout << "d0.month(): " << d0.month() << endl;
+    cout << "d0.day(): " << d0.day() << endl;
+    cout << "d1.daysTo(d2): " << d1.daysTo(d2) << endl;
     
     return 0;
 }
diff --git a/WebCore/src/kwq/tests/qt/qdatetime-test.chk b/WebCore/src/kwq/tests/qt/qdatetime-test.chk
index bd3f1a8..783834e 100644
--- a/WebCore/src/kwq/tests/qt/qdatetime-test.chk
+++ b/WebCore/src/kwq/tests/qt/qdatetime-test.chk
@@ -1,6 +1,6 @@
-dt1: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 0:0:0:0]
-dt2: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:59:999]
-dt3: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:59:999]
-dt0 = dt1: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 0:0:0:0]
+dt2: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:0:0]
+dt3: QDateTime: [yy/mm/dd hh:mm:ss:ms = 2000/12/31 23:59:0:0]
+dt4: QDateTime: [yy/mm/dd hh:mm:ss:ms = 2000/12/31 23:59:0:0]
+dt0=dt2: QDateTime: [yy/mm/dd hh:mm:ss:ms = 1999/12/31 23:59:0:0]
 dt2 secsTo dt3: 31622400
-dt2 time: QTime: [hh:mm:ss:ms = 23:59:59:999]
\ No newline at end of file
+dt2 time: QTime: [hh:mm:ss:ms = 23:59:0:0]
diff --git a/WebCore/src/kwq/tests/qt/qdatetime-test.cpp b/WebCore/src/kwq/tests/qt/qdatetime-test.cpp
index 030d982..beb11f9 100644
--- a/WebCore/src/kwq/tests/qt/qdatetime-test.cpp
+++ b/WebCore/src/kwq/tests/qt/qdatetime-test.cpp
@@ -8,42 +8,28 @@
 
 int main() {
 
-    //QDate d0;
-    QDate d1 = QDate(1999, 12, 31);
-    QDate d2 = QDate(2000, 12, 31);
+    QDate d1(1999, 12, 31);
+    QDate d2(2000, 12, 31);
     
-    //QTime t0;
-    QTime t1 = QTime(23, 59, 59, 999);
-    QTime t2 = QTime(23, 59, 59, 999);
+    QTime t1(23, 59);
+    QTime t2(23, 59);
     
-    QDateTime dt0;    
-    QDateTime dt1 = QDateTime(d1);    
-    QDateTime dt2 = QDateTime(d1, t1);    
-    QDateTime dt3 = QDateTime(d2, t2);
-    
-    cout << "dt1: " << dt1 << endl;
+    QDateTime dt0;       
+    QDateTime dt2(d1, t1);    
+    QDateTime dt3(d2, t2);
+    QDateTime dt4(dt3);
+
     cout << "dt2: " << dt2 << endl;
-    cout << "dt3: " << dt2 << endl;
+    cout << "dt3: " << dt3 << endl;
+    cout << "dt4: " << dt4 << endl;
     
-    dt0 = dt1;
-    cout << "dt0 = dt1: " << dt0 << endl;
+    dt0 = dt2;
+    cout << "dt0=dt2: " << dt0 << endl;
     
     cout << "dt2 secsTo dt3: " << dt2.secsTo(dt3) << endl;
+    cout << "dt2 time: " << dt2.time() << endl;
     
-    cout << "dt2 time: " << dt2.time();
-    
-    //cout << "string: " << dt0.toString() << endl; 
-
-    //d0 = d1.addDays(1);
-    //dt0.setDate(d0);
-    //cout << "setDate: " << dt0 << endl;
-
-    //t0 = t1.addSecs(1);
-    //dt0.setTime(t0);
-    //cout << "setTime: " << dt0 << endl;
 
-    //dt0.setTime_t(1000000000);
-    //cout << "setTime_t: " << dt0 << endl;
 
     return 0;
 }
diff --git a/WebCore/src/kwq/tests/qt/qtime-test.chk b/WebCore/src/kwq/tests/qt/qtime-test.chk
index 9279581..8d0a9c2 100644
--- a/WebCore/src/kwq/tests/qt/qtime-test.chk
+++ b/WebCore/src/kwq/tests/qt/qtime-test.chk
@@ -1,7 +1,11 @@
-d1: QTime: [hh:mm:ss:ms = 23:59:59:999]
-d2: QTime: [hh:mm:ss:ms = 1:8:6:0]
+d1: QTime: [hh:mm:ss:ms = 23:59:0:0]
+d2: QTime: [hh:mm:ss:ms = 1:8:0:0]
 d0 isNull: 1
 d1 isNull: 0
-d0 = d1: QTime: [hh:mm:ss:ms = 23:59:59:999]
-d1 msec: 999
+d0 = d1: QTime: [hh:mm:ss:ms = 23:59:0:0]
+d1 msec: 0
 d2 msec: 0
+d2 hour: 1
+d2 minute: 8
+d2 second: 0
+d2 secsTo d1: 82260
diff --git a/WebCore/src/kwq/tests/qt/qtime-test.cpp b/WebCore/src/kwq/tests/qt/qtime-test.cpp
index ecfb3c2..ef22ac3 100644
--- a/WebCore/src/kwq/tests/qt/qtime-test.cpp
+++ b/WebCore/src/kwq/tests/qt/qtime-test.cpp
@@ -9,8 +9,8 @@
 int main() {
 
     QTime d0;
-    QTime d1 = QTime(23, 59, 59, 999);
-    QTime d2 = QTime(1, 8, 6, 0);
+    QTime d1(23, 59);
+    QTime d2(1, 8);
     QTime d3;
     int elapsedTime;
     
@@ -26,31 +26,16 @@ int main() {
     
     cout << "d1 msec: " << d1.msec() << endl;
     cout << "d2 msec: " << d2.msec() << endl;
+    cout << "d2 hour: " << d2.hour() << endl;
+    cout << "d2 minute: " << d2.minute() << endl;
+    cout << "d2 second: " << d2.second() << endl;
     
+    cout << "d2 secsTo d1: " << d2.secsTo(d1) << endl;
     
     elapsedTime = d3.elapsed(); // nothing is printed because output will never match .chk file
     elapsedTime = d3.restart();
     
     
-    //d0 = d1.addSecs(1);
-    //cout << "day roll (seconds): " << d0 << endl;
-
-    //d0 = d1;
-    //d0 = d1.addMSecs(1);
-    //cout << "day roll (milli-seconds): " << d0 << endl;
-
-    //d2 = d1;
-    //cout << "d0 is: " << d0 << endl;
-    //cout << "d1 is: " << d1 << endl;
-    //cout << "d2 is: " << d2 << endl;
-    //cout << "(d0 < d1): " << (d0 < d1) << endl;
-    //cout << "(d0 <= d1): " << (d0 <= d1) << endl;
-    //cout << "(d0 > d1): " << (d0 > d1) << endl;
-    //cout << "(d0 >= d1): " << (d0 >= d1) << endl;
-    //cout << "(d2 < d1): " << (d2 < d1) << endl;
-    //cout << "(d2 <= d1): " << (d2 <= d1) << endl;
-    //cout << "(d2 > d1): " << (d2 > d1) << endl;
-    //cout << "(d2 >= d1): " << (d2 >= d1) << endl;
     
     return 0;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list