Skip to content

Commit

Permalink
Remove Double infinities from database dump tests
Browse files Browse the repository at this point in the history
Some SQLite versions store or read +inf and -inf as 9.0e+999 and -9.0e+999, and this makes some tests fail.

Known failure: SQLCipher4, test_quote_value_formatting(), https://github.com/groue/GRDB.swift/actions/runs/9388768610/job/25854709627

I could not reproduce.
  • Loading branch information
groue committed Jun 6, 2024
1 parent bbbd6bb commit 6689470
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Tests/GRDBTests/DatabaseDumpTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ final class DatabaseDumpTests: GRDBTestCase {
blob: utf8 short|您好🙂
blob: uuid|69BF8A9C-D9F0-4777-BD11-93451D84CBCF
double: -1.0|-1.0
double: -inf|-inf
double: 0.0|0.0
double: 123.45|123.45
double: inf|inf
double: nan|
integer: -1|-1
integer: 0|0
Expand Down Expand Up @@ -250,10 +248,8 @@ final class DatabaseDumpTests: GRDBTestCase {
{"name":"blob: utf8 short","value":"5oKo5aW98J+Zgg=="},
{"name":"blob: uuid","value":"ab+KnNnwR3e9EZNFHYTLzw=="},
{"name":"double: -1.0","value":-1},
{"name":"double: -inf","value":"-inf"},
{"name":"double: 0.0","value":0},
{"name":"double: 123.45","value":123.45},
{"name":"double: inf","value":"inf"},
{"name":"double: nan","value":null},
{"name":"integer: -1","value":-1},
{"name":"integer: 0","value":0},
Expand Down Expand Up @@ -413,18 +409,12 @@ final class DatabaseDumpTests: GRDBTestCase {
name = double: -1.0
value = -1.0
name = double: -inf
value = -inf
name = double: 0.0
value = 0.0
name = double: 123.45
value = 123.45
name = double: inf
value = inf
name = double: nan
value = \n\
Expand Down Expand Up @@ -604,10 +594,8 @@ final class DatabaseDumpTests: GRDBTestCase {
blob: utf8 short|您好🙂
blob: uuid|\("i\u{fffd}\u{fffd}\u{fffd}\u{fffd}\u{fffd}Gw\u{fffd}\u{11}\u{fffd}E\u{1d}\u{fffd}\u{fffd}\u{fffd}")
double: -1.0|-1.0
double: -inf|-inf
double: 0.0|0.0
double: 123.45|123.45
double: inf|inf
double: nan|
integer: -1|-1
integer: 0|0
Expand Down Expand Up @@ -799,10 +787,8 @@ final class DatabaseDumpTests: GRDBTestCase {
'blob: utf8 short',X'E682A8E5A5BDF09F9982'
'blob: uuid',X'69BF8A9CD9F04777BD1193451D84CBCF'
'double: -1.0',-1.0
'double: -inf',-Inf
'double: 0.0',0.0
'double: 123.45',123.45
'double: inf',Inf
'double: nan',NULL
'integer: -1',-1
'integer: 0',0
Expand Down Expand Up @@ -1586,10 +1572,8 @@ final class DatabaseDumpTests: GRDBTestCase {
INSERT INTO value VALUES ('blob: uuid', x'69BF8A9CD9F04777BD1193451D84CBCF');
INSERT INTO value VALUES ('double: -1.0', -1.0);
INSERT INTO value VALUES ('double: -inf', \(-1.0 / 0));
INSERT INTO value VALUES ('double: 0.0', 0.0);
INSERT INTO value VALUES ('double: 123.45', 123.45);
INSERT INTO value VALUES ('double: inf', \(1.0 / 0));
INSERT INTO value VALUES ('double: nan', \(0.0 / 0));
INSERT INTO value VALUES ('integer: 0', 0);
Expand Down

0 comments on commit 6689470

Please sign in to comment.