Skip to content

Commit b4e5d18

Browse files
committed
Added another from_string test for SparseVector [skip ci]
1 parent 4e5adc7 commit b4e5d18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/pqxx_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,14 @@ void test_sparsevec_from_string() {
277277
assert(std::string_view(e.what()) == "Malformed sparsevec literal");
278278
}
279279

280+
// TODO change to pqxx::conversion_error
281+
try {
282+
auto unused = pqxx::from_string<pgvector::SparseVector>("{1:4e38}/1");
283+
assert(false);
284+
} catch (const std::out_of_range& e) {
285+
assert(true);
286+
}
287+
280288
// TODO change to pqxx::conversion_error
281289
try {
282290
auto unused = pqxx::from_string<pgvector::SparseVector>("{a:1}/1");

0 commit comments

Comments
 (0)