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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/analyzer1.test ('k') | third_party/sqlite/src/test/attach.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2012 June 18 1 # 2012 June 18
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 #***********************************************************************
11 # 11 #
12 # Tests of the sqlite3AtoF() function. 12 # Tests of the sqlite3AtoF() function.
13 # 13 #
14 14
15 set testdir [file dirname $argv0] 15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl 16 source $testdir/tester.tcl
17 17
18 if {![info exists __GNUC__] || [regexp arm $tcl_platform(machine)]} { 18 if {$::longdouble_size<=8} {
19 finish_test 19 finish_test
20 return 20 return
21 } 21 }
22 22
23 expr srand(1) 23 expr srand(1)
24 for {set i 1} {$i<20000} {incr i} { 24 for {set i 1} {$i<20000} {incr i} {
25 set pow [expr {int((rand()-0.5)*100)}] 25 set pow [expr {int((rand()-0.5)*100)}]
26 set x [expr {pow((rand()-0.5)*2*rand(),$pow)}] 26 set x [expr {pow((rand()-0.5)*2*rand(),$pow)}]
27 set xf [format %.32e $x] 27 set xf [format %.32e $x]
28 28
(...skipping 22 matching lines...) Expand all
51 puts [format {QUOTE: %16s %s} {} [db eval {SELECT quote($x)}]] 51 puts [format {QUOTE: %16s %s} {} [db eval {SELECT quote($x)}]]
52 db eval {SELECT CAST(quote($x) AS real) c} {} 52 db eval {SELECT CAST(quote($x) AS real) c} {}
53 puts "OUT: $b [format %.32e $c]" 53 puts "OUT: $b [format %.32e $c]"
54 } 54 }
55 set y 55 set y
56 } {1} 56 } {1}
57 } 57 }
58 58
59 59
60 finish_test 60 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/analyzer1.test ('k') | third_party/sqlite/src/test/attach.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698