File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,14 @@ void test_vector_from_string() {
173173 assert_exception<pqxx::conversion_error>([] {
174174 auto unused = pqxx::from_string<pgvector::Vector>(" [4e38]" );
175175 });
176+
177+ assert_exception<pqxx::conversion_error>([] {
178+ auto unused = pqxx::from_string<pgvector::Vector>(" [,]" );
179+ });
180+
181+ assert_exception<pqxx::conversion_error>([] {
182+ auto unused = pqxx::from_string<pgvector::Vector>(" [1,]" );
183+ });
176184}
177185
178186void test_halfvec_to_string () {
@@ -198,6 +206,18 @@ void test_halfvec_from_string() {
198206 assert_exception<pqxx::conversion_error>([] {
199207 auto unused = pqxx::from_string<pgvector::HalfVector>(" [hello]" );
200208 });
209+
210+ assert_exception<pqxx::conversion_error>([] {
211+ auto unused = pqxx::from_string<pgvector::HalfVector>(" [4e38]" );
212+ });
213+
214+ assert_exception<pqxx::conversion_error>([] {
215+ auto unused = pqxx::from_string<pgvector::HalfVector>(" [,]" );
216+ });
217+
218+ assert_exception<pqxx::conversion_error>([] {
219+ auto unused = pqxx::from_string<pgvector::HalfVector>(" [1,]" );
220+ });
201221}
202222
203223void test_sparsevec_to_string () {
You can’t perform that action at this time.
0 commit comments