Improved tests for sparsevec input [skip ci]

This commit is contained in:
Andrew Kane
2024-04-24 09:58:27 -07:00
parent b2a5259607
commit 9696835a19
2 changed files with 20 additions and 0 deletions

View File

@@ -207,6 +207,22 @@ SELECT '{}/-9223372036854775809'::sparsevec;
ERROR: dimensions "-9223372036854775809" is out of range for type sparsevec
LINE 1: SELECT '{}/-9223372036854775809'::sparsevec;
^
SELECT '{2147483647:1}/1'::sparsevec;
ERROR: index must be less than or equal to dimensions
LINE 1: SELECT '{2147483647:1}/1'::sparsevec;
^
SELECT '{2147483648:1}/1'::sparsevec;
ERROR: index "2147483648" is out of range for type sparsevec
LINE 1: SELECT '{2147483648:1}/1'::sparsevec;
^
SELECT '{-2147483648:1}/1'::sparsevec;
ERROR: index must be greater than zero
LINE 1: SELECT '{-2147483648:1}/1'::sparsevec;
^
SELECT '{-2147483649:1}/1'::sparsevec;
ERROR: index "-2147483649" is out of range for type sparsevec
LINE 1: SELECT '{-2147483649:1}/1'::sparsevec;
^
SELECT '{0:1}/1'::sparsevec;
ERROR: index must be greater than zero
LINE 1: SELECT '{0:1}/1'::sparsevec;

View File

@@ -43,6 +43,10 @@ SELECT '{}/2147483648'::sparsevec;
SELECT '{}/-2147483649'::sparsevec;
SELECT '{}/9223372036854775808'::sparsevec;
SELECT '{}/-9223372036854775809'::sparsevec;
SELECT '{2147483647:1}/1'::sparsevec;
SELECT '{2147483648:1}/1'::sparsevec;
SELECT '{-2147483648:1}/1'::sparsevec;
SELECT '{-2147483649:1}/1'::sparsevec;
SELECT '{0:1}/1'::sparsevec;
SELECT '{2:1}/1'::sparsevec;