mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-28 04:14:34 +01:00
use sqlite_int_float_compare
This commit is contained in:
@@ -253,4 +253,22 @@ foreach {testname lhs rhs ans} {
|
||||
text-text-2 'a' 'a' 0
|
||||
} {
|
||||
do_execsql_test compare-is-not-$testname "SELECT $lhs is not $rhs" $::ans
|
||||
}
|
||||
}
|
||||
|
||||
# github-issue: 2957.
|
||||
do_execsql_test compare-int-float-setup {
|
||||
CREATE TABLE t1(i INTEGER);
|
||||
INSERT INTO t1 VALUES (0), (-1), (1);
|
||||
} {}
|
||||
|
||||
do_execsql_test compare-int-float-lte-negative-zero {
|
||||
SELECT i FROM t1 WHERE i <= -0.0 ORDER BY i;
|
||||
} {-1 0}
|
||||
|
||||
do_execsql_test compare-int-float-lt-negative-zero {
|
||||
SELECT i FROM t1 WHERE i < -0.0 ORDER BY i;
|
||||
} {-1}
|
||||
|
||||
do_execsql_test compare-int-float-cleanup {
|
||||
DROP TABLE t1;
|
||||
} {}
|
||||
Reference in New Issue
Block a user