Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Modify tests in window3.test to be tolerant of rounding errors when comparing floating point values. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7c26c443e7f6455ca7f11f640e42285b |
User & Date: | dan 2018-07-10 18:50:01.938 |
Context
2018-07-10
| ||
19:48 | Identify Select objects within a single statement using small sequential integers rather than "0x%p". This is more readable and yields the same result on successive runs. (check-in: a7cdc5bc85 user: drh tags: trunk) | |
18:50 | Modify tests in window3.test to be tolerant of rounding errors when comparing floating point values. (check-in: 7c26c443e7 user: dan tags: trunk) | |
17:26 | Fix a problem with using scalar sub-selects in window function queries. (check-in: 687fe532c2 user: dan tags: trunk) | |
Changes
Changes to test/pg_common.tcl.
︙ | ︙ | |||
67 68 69 70 71 72 73 | puts $::fd "" } # Same as [execsql_test], except coerce all results to floating point values # with two decimal points. # proc execsql_float_test {tn sql} { | | > > > | | | | < > > | > > > > | | > | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | puts $::fd "" } # Same as [execsql_test], except coerce all results to floating point values # with two decimal points. # proc execsql_float_test {tn sql} { set F "%.4f" set T 0.0001 set res [execsql $sql] set res2 [list] foreach r $res { if {$r != ""} { set r [format $F $r] } lappend res2 $r } set sql [string trim $sql] puts $::fd [subst -nocommands { do_test $tn { set myres {} foreach r [db eval {$sql}] { lappend myres [format $F [set r]] } set res2 {$res2} foreach r [set myres] r2 [set res2] { if {[set r]<([set r2]-$T) || [set r]>([set r2]+$T)} { error "list element [set i] does not match: got=[set r] expected=[set r2]" } } set {} {} } {} }] } proc start_test {name date} { set dir [file dirname $::argv0] set output [file join $dir $name.test] set ::fd [open $output w] puts $::fd [string trimleft " |
︙ | ︙ |
Changes to test/window3.test.
cannot compute difference between binary files