1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a test in func.test so that it works on machines that lack long double. (CVS 5425)

FossilOrigin-Name: 8686959d4289dc0bf9e1c353b948f26cca5a9a65
This commit is contained in:
drh
2008-07-16 18:04:36 +00:00
parent 807b79e765
commit 01859b0b07
3 changed files with 17 additions and 10 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing built-in functions.
#
# $Id: func.test,v 1.82 2008/07/15 00:27:35 drh Exp $
# $Id: func.test,v 1.83 2008/07/16 18:04:37 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -298,10 +298,17 @@ do_test func-8.5 {
} {0}
do_test func-8.6 {
execsql {
SELECT sum(x) FROM (SELECT '9223372036' || '854775808' AS x
SELECT typeof(sum(x)) FROM (SELECT '9223372036' || '854775808' AS x
UNION ALL SELECT -9223372036854775807)
}
} {1.0}
} {real}
do_test func-8.7 {
execsql {
SELECT round(sum(x)/16384.0)
FROM (SELECT '9223372036' || '854775808' AS x
UNION ALL SELECT -9223372036850000000)
}
} {291.0}
# How do you test the random() function in a meaningful, deterministic way?
#