mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Use a built-in atof() function instead of the one from the library to
avoid problems with locale. Ticket #305. (CVS 1144) FossilOrigin-Name: 4d9edbc50f7dee64edbadad2e2dc4f93d8248b3b
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
# focus of this file is testing the the library is able to correctly
|
||||
# handle file-format 3 (version 2.6.x) databases.
|
||||
#
|
||||
# $Id: format3.test,v 1.3 2003/06/03 01:47:12 drh Exp $
|
||||
# $Id: format3.test,v 1.4 2003/12/23 02:17:35 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -686,7 +686,7 @@ do_test format3-11.2 {
|
||||
execsql {SELECT '0'==0.0}
|
||||
} {1}
|
||||
do_test format3-11.3 {
|
||||
execsql {SELECT '12345678901234567890'=='12345678901234567891'}
|
||||
execsql {SELECT '123456789012345678901'=='123456789012345678900'}
|
||||
} {1}
|
||||
do_test format3-11.4 {
|
||||
execsql {
|
||||
|
@ -13,7 +13,7 @@
|
||||
# This file implements tests for miscellanous features that were
|
||||
# left out of other test files.
|
||||
#
|
||||
# $Id: misc3.test,v 1.1 2003/12/17 23:57:36 drh Exp $
|
||||
# $Id: misc3.test,v 1.2 2003/12/23 02:17:35 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -68,4 +68,35 @@ do_test misc3-1.2 {
|
||||
}
|
||||
} ok
|
||||
|
||||
# Tests of the sqliteAtoF() function in util.c
|
||||
#
|
||||
do_test misc3-2.1 {
|
||||
execsql {SELECT 2e-25*0.5e25}
|
||||
} 1
|
||||
do_test misc3-2.2 {
|
||||
execsql {SELECT 2.0e-25*000000.500000000000000000000000000000e+00025}
|
||||
} 1
|
||||
do_test misc3-2.3 {
|
||||
execsql {SELECT 000000000002e-0000000025*0.5e25}
|
||||
} 1
|
||||
do_test misc3-2.4 {
|
||||
execsql {SELECT 2e-25*0.5e250}
|
||||
} 1e+225
|
||||
do_test misc3-2.5 {
|
||||
execsql {SELECT 2.0e-250*0.5e25}
|
||||
} 1e-225
|
||||
do_test misc3-2.6 {
|
||||
execsql {SELECT '-2.0e-127' * '-0.5e27'}
|
||||
} 1e-100
|
||||
do_test misc3-2.7 {
|
||||
execsql {SELECT '+2.0e-127' * '-0.5e27'}
|
||||
} -1e-100
|
||||
do_test misc3-2.8 {
|
||||
execsql {SELECT 2.0e-27 * '+0.5e+127'}
|
||||
} 1e+100
|
||||
do_test misc3-2.9 {
|
||||
execsql {SELECT 2.0e-27 * '+0.000005e+132'}
|
||||
} 1e+100
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user