1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix the shift operators so that they work with 64-bit quantities. (CVS 2752)

FossilOrigin-Name: 0d3357b5f65887f7db03db2ae021f28f480f90e4
This commit is contained in:
drh
2005-10-29 15:48:30 +00:00
parent eef8b55832
commit b127612933
4 changed files with 18 additions and 11 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing expressions.
#
# $Id: expr.test,v 1.45 2005/08/19 03:03:52 drh Exp $
# $Id: expr.test,v 1.46 2005/10/29 15:48:32 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -132,6 +132,11 @@ test_expr expr-1.99 {i1=32, i2=NULL} {coalesce(i1&i2,99)} 99
test_expr expr-1.100 {i1=1, i2=''} {i1=i2} 0
test_expr expr-1.101 {i1=0, i2=''} {i1=i2} 0
# Check for proper handling of 64-bit integer values.
#
test_expr expr-1.102 {i1=40, i2=1} {i2<<i1} 1099511627776
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
test_expr expr-2.3 {r1=1.23, r2=2.34} {r1*r2} 2.8782
@ -629,4 +634,6 @@ do_test expr-11.2 {
execsql {SELECT typeof(9223372036854775808)}
} {real}
finish_test