Skip to content

Commit 5f3aff7

Browse files
committed
Added test
1 parent 936da20 commit 5f3aff7

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
@@ -241,6 +241,14 @@ void test_sparsevec_from_string() {
241241
assert(std::string_view(e.what()) == "Malformed sparsevec literal");
242242
}
243243

244+
// TODO change to pqxx::conversion_error
245+
try {
246+
auto unused = pqxx::from_string<pgvector::SparseVector>("{ }/");
247+
assert(false);
248+
} catch (const std::invalid_argument& e) {
249+
assert(true);
250+
}
251+
244252
try {
245253
auto unused = pqxx::from_string<pgvector::SparseVector>("{}/-1");
246254
assert(false);

0 commit comments

Comments
 (0)