diff options
author | drh <> | 2023-03-22 16:24:17 +0000 |
---|---|---|
committer | drh <> | 2023-03-22 16:24:17 +0000 |
commit | c408c155d7d65f9d00e93d61449fce018d0f242b (patch) | |
tree | 7e8c49b9879eda4ef6e8f77fb8d5960c34abbabb /test/json101.test | |
parent | 8854f30295cb35cb5d6185aed84d2fe6336dcf8a (diff) | |
parent | 667b5cc985d68f0f63e67a2888d0ec36c83a1688 (diff) | |
download | sqlite-c408c155d7d65f9d00e93d61449fce018d0f242b.tar.gz sqlite-c408c155d7d65f9d00e93d61449fce018d0f242b.zip |
The double-to-text conversion renders infinity as 9e999, so that JSON
output is compliant and so that values can be round-tripped.
FossilOrigin-Name: b52081d0acd07dc5bdb4951a3e8419866131965260c1e3a4c9b6e673bfe3dfea
Diffstat (limited to 'test/json101.test')
-rw-r--r-- | test/json101.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/json101.test b/test/json101.test index 135c988e9..596a08496 100644 --- a/test/json101.test +++ b/test/json101.test @@ -885,4 +885,16 @@ do_execsql_test json-19.3 { SELECT * FROM t1; } {} +# 2023-03-17 positive and negative infinities +# +do_execsql_test json-20.1 { + SELECT json_object('a',2e370,'b',-3e380); +} {{{"a":9.0e+999,"b":-9.0e+999}}} +do_execsql_test json-20.2 { + SELECT json_object('a',2e370,'b',-3e380)->>'a'; +} Inf +do_execsql_test json-20.3 { + SELECT json_object('a',2e370,'b',-3e380)->>'b'; +} {-Inf} + finish_test |