File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,24 @@ func TestTableInsert(t *testing.T) {
107107 value : math .Inf (1 ),
108108 err : true ,
109109 },
110+ {
111+ name : "inserting negative Infinity into float results in error" ,
112+ colType : types .Float64 ,
113+ value : math .Inf (- 1 ),
114+ err : true ,
115+ },
116+ {
117+ name : "inserting negative Infinity into int results in error" ,
118+ colType : types .Int64 ,
119+ value : math .Inf (- 1 ),
120+ err : true ,
121+ },
122+ {
123+ name : "inserting negative Infinity into Decimal results in error" ,
124+ colType : types .MustCreateDecimalType (types .DecimalTypeMaxPrecision , types .DecimalTypeMaxScale ),
125+ value : math .Inf (- 1 ),
126+ err : true ,
127+ },
110128 }
111129
112130 for _ , tc := range testCases {
Original file line number Diff line number Diff line change @@ -112,6 +112,24 @@ func TestInsert(t *testing.T) {
112112 value : math .Inf (1 ),
113113 err : true ,
114114 },
115+ {
116+ name : "inserting negative Infinity into float results in error" ,
117+ colType : types .Float64 ,
118+ value : math .Inf (- 1 ),
119+ err : true ,
120+ },
121+ {
122+ name : "inserting negative Infinity into int results in error" ,
123+ colType : types .Int64 ,
124+ value : math .Inf (- 1 ),
125+ err : true ,
126+ },
127+ {
128+ name : "inserting negative Infinity into Decimal results in error" ,
129+ colType : types .MustCreateDecimalType (types .DecimalTypeMaxPrecision , types .DecimalTypeMaxScale ),
130+ value : math .Inf (- 1 ),
131+ err : true ,
132+ },
115133 }
116134
117135 for _ , tc := range testCases {
You can’t perform that action at this time.
0 commit comments