testing/compare.test: Clean up tests by using in-memory database

Suggested by Jussi
This commit is contained in:
Pekka Enberg
2025-09-10 14:14:46 +03:00
parent 22b352bc2f
commit f3ee355fa1

View File

@@ -256,19 +256,14 @@ foreach {testname lhs rhs ans} {
}
# github-issue: 2957.
do_execsql_test compare-int-float-setup {
do_execsql_test_on_specific_db {:memory:} compare-int-float-lte-negative-zero {
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 {
do_execsql_test_on_specific_db {:memory:} compare-int-float-lt-negative-zero {
CREATE TABLE t1(i INTEGER);
INSERT INTO t1 VALUES (0), (-1), (1);
SELECT i FROM t1 WHERE i < -0.0 ORDER BY i;
} {-1}
do_execsql_test compare-int-float-cleanup {
DROP TABLE t1;
} {}
} {-1}