Skip to content

Commit faf4352

Browse files
committed
Improved test [skip ci]
1 parent 8c70109 commit faf4352

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/pqxx_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ void test_sparsevec_from_string() {
280280
auto _ = pqxx::from_string<pgvector::SparseVector>("{2:1}/1");
281281
}, "sparsevec index out of bounds");
282282

283+
assert_exception<pqxx::conversion_error>([] {
284+
auto _ = pqxx::from_string<pgvector::SparseVector>("{1:1}/0");
285+
}, "sparsevec index out of bounds");
286+
283287
assert_exception<pqxx::conversion_error>([] {
284288
auto _ = pqxx::from_string<pgvector::SparseVector>("{1:4e38}/1");
285289
}, float_error("Could not convert '4e38' to float: Value out of range."));

0 commit comments

Comments
 (0)