File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -432,12 +432,20 @@ def test_bind_uhugeint
432432 def test_bind_float
433433 stmt = DuckDB ::PreparedStatement . new ( @con , 'SELECT * FROM a WHERE col_real = $1' )
434434
435- assert_raises ( ArgumentError ) { stmt . bind_float ( 0 , 12_345.375 ) }
436- assert_raises ( DuckDB ::Error ) { stmt . bind_float ( 2 , 12_345.375 ) }
437-
438435 stmt . bind_float ( 1 , 12_345.375 )
439436
440437 assert_equal ( expected_row , stmt . execute . each . first )
438+ end
439+
440+ def test_bind_float_with_invalid_index
441+ stmt = DuckDB ::PreparedStatement . new ( @con , 'SELECT * FROM a WHERE col_real = $1' )
442+
443+ assert_raises ( ArgumentError ) { stmt . bind_float ( 0 , 12_345.375 ) }
444+ assert_raises ( DuckDB ::Error ) { stmt . bind_float ( 2 , 12_345.375 ) }
445+ end
446+
447+ def test_bind_float_with_invalid_type
448+ stmt = DuckDB ::PreparedStatement . new ( @con , 'SELECT * FROM a WHERE col_real = $1' )
441449
442450 assert_raises ( TypeError ) { stmt . bind_float ( 1 , 'invalid_float_val' ) }
443451 end
You can’t perform that action at this time.
0 commit comments