| Index: third_party/sqlite/src/test/expr.test
|
| diff --git a/third_party/sqlite/src/test/expr.test b/third_party/sqlite/src/test/expr.test
|
| index 1d624d7b13b9c88541f9004566cf18104cc35852..5a3d16751767b74b9dd3fac1b85ab81c37193b7f 100644
|
| --- a/third_party/sqlite/src/test/expr.test
|
| +++ b/third_party/sqlite/src/test/expr.test
|
| @@ -82,8 +82,18 @@ test_expr expr-1.43 {i1=1, i2=2} {i1&i2} {0}
|
| test_expr expr-1.43b {i1=1, i2=2} {4&5} {4}
|
| test_expr expr-1.44 {i1=1} {~i1} {-2}
|
| test_expr expr-1.44b {i1=NULL} {~i1} {{}}
|
| -test_expr expr-1.45 {i1=1, i2=3} {i1<<i2} {8}
|
| -test_expr expr-1.46 {i1=32, i2=3} {i1>>i2} {4}
|
| +test_expr expr-1.45a {i1=1, i2=3} {i1<<i2} {8}
|
| +test_expr expr-1.45b {i1=1, i2=-3} {i1>>i2} {8}
|
| +test_expr expr-1.45c {i1=1, i2=0} {i1<<i2} {1}
|
| +test_expr expr-1.45d {i1=1, i2=62} {i1<<i2} {4611686018427387904}
|
| +test_expr expr-1.45e {i1=1, i2=63} {i1<<i2} {-9223372036854775808}
|
| +test_expr expr-1.45f {i1=1, i2=64} {i1<<i2} {0}
|
| +test_expr expr-1.45g {i1=32, i2=-9223372036854775808} {i1>>i2} {0}
|
| +test_expr expr-1.46a {i1=32, i2=3} {i1>>i2} {4}
|
| +test_expr expr-1.46b {i1=32, i2=6} {i1>>i2} {0}
|
| +test_expr expr-1.46c {i1=-32, i2=3} {i1>>i2} {-4}
|
| +test_expr expr-1.46d {i1=-32, i2=100} {i1>>i2} {-1}
|
| +test_expr expr-1.46e {i1=32, i2=-3} {i1>>i2} {256}
|
| test_expr expr-1.47 {i1=9999999999, i2=8888888888} {i1<i2} 0
|
| test_expr expr-1.48 {i1=9999999999, i2=8888888888} {i1=i2} 0
|
| test_expr expr-1.49 {i1=9999999999, i2=8888888888} {i1>i2} 1
|
| @@ -154,10 +164,10 @@ ifcapable floatingpoint {
|
| }
|
|
|
| if {[working_64bit_int]} {
|
| - test_expr expr-1.106 {i1=0} {(1<<63)/-1} -9223372036854775808
|
| + test_expr expr-1.106 {i1=0} {-9223372036854775808/-1} 9.22337203685478e+18
|
| }
|
|
|
| -test_expr expr-1.107 {i1=0} {(1<<63)%-1} 0
|
| +test_expr expr-1.107 {i1=0} {-9223372036854775808%-1} 0
|
| test_expr expr-1.108 {i1=0} {1%0} {{}}
|
| test_expr expr-1.109 {i1=0} {1/0} {{}}
|
|
|
| @@ -165,6 +175,132 @@ if {[working_64bit_int]} {
|
| test_expr expr-1.110 {i1=0} {-9223372036854775807/-1} 9223372036854775807
|
| }
|
|
|
| +test_expr expr-1.111 {i1=NULL, i2=8} {i1 IS i2} 0
|
| +test_expr expr-1.112 {i1=NULL, i2=NULL} {i1 IS i2} 1
|
| +test_expr expr-1.113 {i1=6, i2=NULL} {i1 IS i2} 0
|
| +test_expr expr-1.114 {i1=6, i2=6} {i1 IS i2} 1
|
| +test_expr expr-1.115 {i1=NULL, i2=8} \
|
| + {CASE WHEN i1 IS i2 THEN 'yes' ELSE 'no' END} no
|
| +test_expr expr-1.116 {i1=NULL, i2=NULL} \
|
| + {CASE WHEN i1 IS i2 THEN 'yes' ELSE 'no' END} yes
|
| +test_expr expr-1.117 {i1=6, i2=NULL} \
|
| + {CASE WHEN i1 IS i2 THEN 'yes' ELSE 'no' END} no
|
| +test_expr expr-1.118 {i1=8, i2=8} \
|
| + {CASE WHEN i1 IS i2 THEN 'yes' ELSE 'no' END} yes
|
| +test_expr expr-1.119 {i1=NULL, i2=8} {i1 IS NOT i2} 1
|
| +test_expr expr-1.120 {i1=NULL, i2=NULL} {i1 IS NOT i2} 0
|
| +test_expr expr-1.121 {i1=6, i2=NULL} {i1 IS NOT i2} 1
|
| +test_expr expr-1.122 {i1=6, i2=6} {i1 IS NOT i2} 0
|
| +test_expr expr-1.123 {i1=NULL, i2=8} \
|
| + {CASE WHEN i1 IS NOT i2 THEN 'yes' ELSE 'no' END} yes
|
| +test_expr expr-1.124 {i1=NULL, i2=NULL} \
|
| + {CASE WHEN i1 IS NOT i2 THEN 'yes' ELSE 'no' END} no
|
| +test_expr expr-1.125 {i1=6, i2=NULL} \
|
| + {CASE WHEN i1 IS NOT i2 THEN 'yes' ELSE 'no' END} yes
|
| +test_expr expr-1.126 {i1=8, i2=8} \
|
| + {CASE WHEN i1 IS NOT i2 THEN 'yes' ELSE 'no' END} no
|
| +
|
| +ifcapable floatingpoint {if {[working_64bit_int]} {
|
| + test_expr expr-1.200\
|
| + {i1=9223372036854775806, i2=1} {i1+i2} 9223372036854775807
|
| + test_expr expr-1.201\
|
| + {i1=9223372036854775806, i2=2} {i1+i2} 9.22337203685478e+18
|
| + test_expr expr-1.202\
|
| + {i1=9223372036854775806, i2=100000} {i1+i2} 9.22337203685488e+18
|
| + test_expr expr-1.203\
|
| + {i1=9223372036854775807, i2=0} {i1+i2} 9223372036854775807
|
| + test_expr expr-1.204\
|
| + {i1=9223372036854775807, i2=1} {i1+i2} 9.22337203685478e+18
|
| + test_expr expr-1.205\
|
| + {i2=9223372036854775806, i1=1} {i1+i2} 9223372036854775807
|
| + test_expr expr-1.206\
|
| + {i2=9223372036854775806, i1=2} {i1+i2} 9.22337203685478e+18
|
| + test_expr expr-1.207\
|
| + {i2=9223372036854775806, i1=100000} {i1+i2} 9.22337203685488e+18
|
| + test_expr expr-1.208\
|
| + {i2=9223372036854775807, i1=0} {i1+i2} 9223372036854775807
|
| + test_expr expr-1.209\
|
| + {i2=9223372036854775807, i1=1} {i1+i2} 9.22337203685478e+18
|
| + test_expr expr-1.210\
|
| + {i1=-9223372036854775807, i2=-1} {i1+i2} -9223372036854775808
|
| + test_expr expr-1.211\
|
| + {i1=-9223372036854775807, i2=-2} {i1+i2} -9.22337203685478e+18
|
| + test_expr expr-1.212\
|
| + {i1=-9223372036854775807, i2=-100000} {i1+i2} -9.22337203685488e+18
|
| + test_expr expr-1.213\
|
| + {i1=-9223372036854775808, i2=0} {i1+i2} -9223372036854775808
|
| + test_expr expr-1.214\
|
| + {i1=-9223372036854775808, i2=-1} {i1+i2} -9.22337203685478e+18
|
| + test_expr expr-1.215\
|
| + {i2=-9223372036854775807, i1=-1} {i1+i2} -9223372036854775808
|
| + test_expr expr-1.216\
|
| + {i2=-9223372036854775807, i1=-2} {i1+i2} -9.22337203685478e+18
|
| + test_expr expr-1.217\
|
| + {i2=-9223372036854775807, i1=-100000} {i1+i2} -9.22337203685488e+18
|
| + test_expr expr-1.218\
|
| + {i2=-9223372036854775808, i1=0} {i1+i2} -9223372036854775808
|
| + test_expr expr-1.219\
|
| + {i2=-9223372036854775808, i1=-1} {i1+i2} -9.22337203685478e+18
|
| + test_expr expr-1.220\
|
| + {i1=9223372036854775806, i2=-1} {i1-i2} 9223372036854775807
|
| + test_expr expr-1.221\
|
| + {i1=9223372036854775806, i2=-2} {i1-i2} 9.22337203685478e+18
|
| + test_expr expr-1.222\
|
| + {i1=9223372036854775806, i2=-100000} {i1-i2} 9.22337203685488e+18
|
| + test_expr expr-1.223\
|
| + {i1=9223372036854775807, i2=0} {i1-i2} 9223372036854775807
|
| + test_expr expr-1.224\
|
| + {i1=9223372036854775807, i2=-1} {i1-i2} 9.22337203685478e+18
|
| + test_expr expr-1.225\
|
| + {i2=-9223372036854775806, i1=1} {i1-i2} 9223372036854775807
|
| + test_expr expr-1.226\
|
| + {i2=-9223372036854775806, i1=2} {i1-i2} 9.22337203685478e+18
|
| + test_expr expr-1.227\
|
| + {i2=-9223372036854775806, i1=100000} {i1-i2} 9.22337203685488e+18
|
| + test_expr expr-1.228\
|
| + {i2=-9223372036854775807, i1=0} {i1-i2} 9223372036854775807
|
| + test_expr expr-1.229\
|
| + {i2=-9223372036854775807, i1=1} {i1-i2} 9.22337203685478e+18
|
| + test_expr expr-1.230\
|
| + {i1=-9223372036854775807, i2=1} {i1-i2} -9223372036854775808
|
| + test_expr expr-1.231\
|
| + {i1=-9223372036854775807, i2=2} {i1-i2} -9.22337203685478e+18
|
| + test_expr expr-1.232\
|
| + {i1=-9223372036854775807, i2=100000} {i1-i2} -9.22337203685488e+18
|
| + test_expr expr-1.233\
|
| + {i1=-9223372036854775808, i2=0} {i1-i2} -9223372036854775808
|
| + test_expr expr-1.234\
|
| + {i1=-9223372036854775808, i2=1} {i1-i2} -9.22337203685478e+18
|
| + test_expr expr-1.235\
|
| + {i2=9223372036854775807, i1=-1} {i1-i2} -9223372036854775808
|
| + test_expr expr-1.236\
|
| + {i2=9223372036854775807, i1=-2} {i1-i2} -9.22337203685478e+18
|
| + test_expr expr-1.237\
|
| + {i2=9223372036854775807, i1=-100000} {i1-i2} -9.22337203685488e+18
|
| + test_expr expr-1.238\
|
| + {i2=9223372036854775807, i1=0} {i1-i2} -9223372036854775807
|
| + test_expr expr-1.239\
|
| + {i2=9223372036854775807, i1=-1} {i1-i2} -9223372036854775808
|
| +
|
| + test_expr expr-1.250\
|
| + {i1=4294967296, i2=2147483648} {i1*i2} 9.22337203685478e+18
|
| + test_expr expr-1.251\
|
| + {i1=4294967296, i2=2147483647} {i1*i2} 9223372032559808512
|
| + test_expr expr-1.252\
|
| + {i1=-4294967296, i2=2147483648} {i1*i2} -9223372036854775808
|
| + test_expr expr-1.253\
|
| + {i1=-4294967296, i2=2147483647} {i1*i2} -9223372032559808512
|
| + test_expr expr-1.254\
|
| + {i1=4294967296, i2=-2147483648} {i1*i2} -9223372036854775808
|
| + test_expr expr-1.255\
|
| + {i1=4294967296, i2=-2147483647} {i1*i2} -9223372032559808512
|
| + test_expr expr-1.256\
|
| + {i1=-4294967296, i2=-2147483648} {i1*i2} 9.22337203685478e+18
|
| + test_expr expr-1.257\
|
| + {i1=-4294967296, i2=-2147483647} {i1*i2} 9223372032559808512
|
| +
|
| +}}
|
| +
|
| ifcapable floatingpoint {
|
| test_expr expr-2.1 {r1=1.23, r2=2.34} {r1+r2} 3.57
|
| test_expr expr-2.2 {r1=1.23, r2=2.34} {r1-r2} -1.11
|
| @@ -265,7 +401,7 @@ ifcapable floatingpoint {
|
| test_expr expr-4.14 {r1='abc', r2='Bbc'} {r1>r2} 1
|
| test_expr expr-4.15 {r1='0', r2='0.0'} {r1==r2} 1
|
| test_expr expr-4.16 {r1='0.000', r2='0.0'} {r1==r2} 1
|
| - test_expr expr-4.17 {r1=' 0.000', r2=' 0.0'} {r1==r2} 0
|
| + test_expr expr-4.17 {r1=' 0.000', r2=' 0.0'} {r1==r2} 1
|
| test_expr expr-4.18 {r1='0.0', r2='abc'} {r1<r2} 1
|
| test_expr expr-4.19 {r1='0.0', r2='abc'} {r1==r2} 0
|
| test_expr expr-4.20 {r1='0.0', r2='abc'} {r1>r2} 0
|
|
|