diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-21 07:00:13 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-21 07:00:13 +0000 |
commit | 3faa6ebe0068b432ee5a9390c47ceca068ea7fe9 (patch) | |
tree | c571245b455a9a5dd80022270c5ac943532620b9 /dev-db/sqlite/files | |
parent | ee93fbc2bb111cf895ae00cc1877c68f0eafaf2a (diff) |
gentoo auto-resync : 21:03:2024 - 07:00:13
Diffstat (limited to 'dev-db/sqlite/files')
-rw-r--r-- | dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch b/dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch new file mode 100644 index 000000000000..153dd82c1e19 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch @@ -0,0 +1,112 @@ +https://sqlite.org/forum/forumpost/7dfd585ce1 +https://sqlite.org/src/info/d0fbe779bc2460e1 + +Index: test/func4.test +================================================================== +--- a/test/func4.test ++++ b/test/func4.test +@@ -1,6 +1,6 @@ +-# 2013 March 10 ++# 2023-03-10 + # + # The author disclaims copyright to this source code. In place of + # a legal notice, here is a blessing: + # + # May you do good and not evil. +@@ -7,11 +7,14 @@ + # May you find forgiveness for yourself and forgive others. + # May you share freely, never taking more than you give. + # + #*********************************************************************** + # This file implements regression tests for SQLite library. The focus of +-# this file is testing the tointeger() and toreal() functions. ++# this file is testing the tointeger() and toreal() functions that are ++# part of the "totype.c" extension. This file does not test the core ++# SQLite library. Failures of tests in this file are related to the ++# ext/misc/totype.c extension. + # + # Several of the toreal() tests are disabled on platforms where floating + # point precision is not high enough to represent their constant integer + # expression arguments as double precision floating point values. + # +@@ -21,10 +24,24 @@ + set tcl_precision 0 + load_static_extension db totype + + set highPrecision(1) [expr \ + {[db eval {SELECT tointeger(9223372036854775807 + 1);}] eq {{}}}] ++set highPrecision(2) [expr \ ++ {[db eval {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}] ++ ++# highPrecision(3) is only known to be false on i586 with gcc-13 and -O2. ++# It is true on the exact same platform with -O0. Both results seem ++# reasonable, so we'll just very the expectation accordingly. ++# ++set highPrecision(3) [expr \ ++ {[db eval {SELECT toreal(9007199254740992 + 1);}] eq {{}}}] ++ ++if {!$highPrecision(1) || !$highPrecision(2) || !$highPrecision(3)} { ++ puts "NOTICE: use_long_double: [use_long_double] \ ++ highPrecision: $highPrecision(1) $highPrecision(2) $highPrecision(3)" ++} + + do_execsql_test func4-1.1 { + SELECT tointeger(NULL); + } {{}} + do_execsql_test func4-1.2 { +@@ -193,12 +210,10 @@ + do_execsql_test func4-1.55 { + SELECT tointeger(18446744073709551616 + 1); + } {{}} + + ifcapable floatingpoint { +- set highPrecision(2) [expr \ +- {[db eval {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}] + + do_execsql_test func4-2.1 { + SELECT toreal(NULL); + } {{}} + do_execsql_test func4-2.2 { +@@ -339,14 +354,18 @@ + SELECT toreal(9007199254740992 - 1); + } {9007199254740991.0} + do_execsql_test func4-2.45 { + SELECT toreal(9007199254740992); + } {9007199254740992.0} +- if {$highPrecision(2)} { ++ if {$highPrecision(3)} { ++ do_execsql_test func4-2.46 { ++ SELECT toreal(9007199254740992 + 1); ++ } {{}} ++ } else { + do_execsql_test func4-2.46 { + SELECT toreal(9007199254740992 + 1); +- } {{}} ++ } {9007199254740992.0} + } + do_execsql_test func4-2.47 { + SELECT toreal(9007199254740992 + 2); + } {9007199254740994.0} + do_execsql_test func4-2.48 { +@@ -624,14 +643,18 @@ + SELECT tointeger(toreal(9007199254740992 - 1)); + } {9007199254740991} + do_execsql_test func4-5.22 { + SELECT tointeger(toreal(9007199254740992)); + } {9007199254740992} +- if {$highPrecision(2)} { ++ if {$highPrecision(3)} { + do_execsql_test func4-5.23 { + SELECT tointeger(toreal(9007199254740992 + 1)); + } {{}} ++ } else { ++ do_execsql_test func4-5.23 { ++ SELECT tointeger(toreal(9007199254740992 + 1)); ++ } {9007199254740992} + } + do_execsql_test func4-5.24 { + SELECT tointeger(toreal(9007199254740992 + 2)); + } {9007199254740994} + if {$highPrecision(1)} { + + |