Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: third_party/sqlite/src/test/date.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/cursorhint2.test ('k') | third_party/sqlite/src/test/dbfuzz.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2003 October 31 1 # 2003 October 31
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 datetest 1.18.1 {julianday('2000-01-01 12:00:00')} 2451545.0 55 datetest 1.18.1 {julianday('2000-01-01 12:00:00')} 2451545.0
56 datetest 1.18.2 {julianday('2000-01-01T12:00:00')} 2451545.0 56 datetest 1.18.2 {julianday('2000-01-01T12:00:00')} 2451545.0
57 datetest 1.18.3 {julianday('2000-01-01 T12:00:00')} 2451545.0 57 datetest 1.18.3 {julianday('2000-01-01 T12:00:00')} 2451545.0
58 datetest 1.18.4 {julianday('2000-01-01T 12:00:00')} 2451545.0 58 datetest 1.18.4 {julianday('2000-01-01T 12:00:00')} 2451545.0
59 datetest 1.18.4 {julianday('2000-01-01 T 12:00:00')} 2451545.0 59 datetest 1.18.4 {julianday('2000-01-01 T 12:00:00')} 2451545.0
60 datetest 1.19 {julianday('2000-01-01 12:00:00.1')} 2451545.00000116 60 datetest 1.19 {julianday('2000-01-01 12:00:00.1')} 2451545.00000116
61 datetest 1.20 {julianday('2000-01-01 12:00:00.01')} 2451545.00000012 61 datetest 1.20 {julianday('2000-01-01 12:00:00.01')} 2451545.00000012
62 datetest 1.21 {julianday('2000-01-01 12:00:00.001')} 2451545.00000001 62 datetest 1.21 {julianday('2000-01-01 12:00:00.001')} 2451545.00000001
63 datetest 1.22 {julianday('2000-01-01 12:00:00.')} NULL 63 datetest 1.22 {julianday('2000-01-01 12:00:00.')} NULL
64 datetest 1.23 julianday(12345.6) 12345.6 64 datetest 1.23 julianday(12345.6) 12345.6
65 datetest 1.23b julianday('12345.6') 12345.6 65 datetest 1.23b julianday(1721059.5) 1721059.5
66 datetest 1.24 {julianday('2001-01-01 12:00:00 bogus')} NULL 66 datetest 1.24 {julianday('2001-01-01 12:00:00 bogus')} NULL
67 datetest 1.25 {julianday('2001-01-01 bogus')} NULL 67 datetest 1.25 {julianday('2001-01-01 bogus')} NULL
68 datetest 1.26 {julianday('2001-01-01 12:60:00')} NULL 68 datetest 1.26 {julianday('2001-01-01 12:60:00')} NULL
69 datetest 1.27 {julianday('2001-01-01 12:59:60')} NULL 69 datetest 1.27 {julianday('2001-01-01 12:59:60')} NULL
70 datetest 1.28 {julianday('2001-00-01')} NULL 70 datetest 1.28 {julianday('2001-00-01')} NULL
71 datetest 1.29 {julianday('2001-01-00')} NULL 71 datetest 1.29 {julianday('2001-01-00')} NULL
72 72
73 datetest 2.1 datetime(0,'unixepoch') {1970-01-01 00:00:00} 73 datetest 2.1 datetime(0,'unixepoch') {1970-01-01 00:00:00}
74 datetest 2.1b datetime(0,'unixepoc') NULL 74 datetest 2.1b datetime(0,'unixepoc') NULL
75 datetest 2.1c datetime(0,'unixepochx') NULL 75 datetest 2.1c datetime(0,'unixepochx') NULL
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 sleeper(), julianday('now') AS c); 553 sleeper(), julianday('now') AS c);
554 } 554 }
555 } {0.0} 555 } {0.0}
556 do_test date-15.2 { 556 do_test date-15.2 {
557 db eval { 557 db eval {
558 SELECT a==b FROM (SELECT current_timestamp AS a, 558 SELECT a==b FROM (SELECT current_timestamp AS a,
559 sleeper(), current_timestamp AS b); 559 sleeper(), current_timestamp AS b);
560 } 560 }
561 } {1} 561 } {1}
562 562
563 # Tests of extreme values in date/time functions. Run with UBSan or the
564 # equivalent to verify no signed interger overflow warnings.
565 #
566 datetest 16.1 {date(147483649)} NULL
567 datetest 16.2 {datetime(0)} {-4713-11-24 12:00:00}
568 datetest 16.3 {datetime(5373484.49999999)} {9999-12-31 23:59:59}
569 datetest 16.4 {julianday('-4713-11-24 12:00:00')} 0.0
570 datetest 16.5 {julianday('9999-12-31 23:59:59.999')} 5373484.49999999
571 datetest 16.6 {datetime(0,'+464269060799 seconds')} {9999-12-31 23:59:59}
572 datetest 16.7 {datetime(0,'+464269060800 seconds')} NULL
573 datetest 16.8 {datetime(0,'+7737817679 minutes')} {9999-12-31 23:59:00}
574 datetest 16.9 {datetime(0,'+7737817680 minutes')} NULL
575 datetest 16.10 {datetime(0,'+128963627 hours')} {9999-12-31 23:00:00}
576 datetest 16.11 {datetime(0,'+128963628 hours')} NULL
577 datetest 16.12 {datetime(0,'+5373484 days')} {9999-12-31 12:00:00}
578 datetest 16.13 {datetime(0,'+5373485 days')} NULL
579 datetest 16.14 {datetime(0,'+176545 months')} {9999-12-24 12:00:00}
580 datetest 16.15 {datetime(0,'+176546 months')} NULL
581 datetest 16.16 {datetime(0,'+14712 years')} {9999-11-24 12:00:00}
582 datetest 16.17 {datetime(0,'+14713 years')} NULL
583 datetest 16.20 {datetime(5373484.4999999,'-464269060799 seconds')} \
584 {-4713-11-24 12:00:00}
585 datetest 16.21 {datetime(5373484,'-464269060800 seconds')} NULL
586 datetest 16.22 {datetime(5373484.4999999,'-7737817679 minutes')} \
587 {-4713-11-24 12:00:59}
588 datetest 16.23 {datetime(5373484,'-7737817680 minutes')} NULL
589 datetest 16.24 {datetime(5373484.4999999,'-128963627 hours')} \
590 {-4713-11-24 12:59:59}
591 datetest 16.25 {datetime(5373484,'-128963628 hours')} NULL
592 datetest 16.26 {datetime(5373484,'-5373484 days')} {-4713-11-24 12:00:00}
593 datetest 16.27 {datetime(5373484,'-5373485 days')} NULL
594 datetest 16.28 {datetime(5373484,'-176545 months')} {-4713-12-01 12:00:00}
595 datetest 16.29 {datetime(5373484,'-176546 months')} NULL
596 datetest 16.30 {datetime(5373484,'-14712 years')} {-4713-12-31 12:00:00}
597 datetest 16.31 {datetime(5373484,'-14713 years')} NULL
598
599
563 finish_test 600 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/cursorhint2.test ('k') | third_party/sqlite/src/test/dbfuzz.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698