Skip to content

Commit 23dee7f

Browse files
committed
Improved tests
1 parent a0e89e3 commit 23dee7f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/pqxx_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,19 @@ void test_vector_from_string() {
168168

169169
assert_exception<pqxx::conversion_error>([] {
170170
auto unused = pqxx::from_string<pgvector::Vector>("[hello]");
171-
});
171+
}, "Could not convert 'hello' to float: Invalid argument.");
172172

173173
assert_exception<pqxx::conversion_error>([] {
174174
auto unused = pqxx::from_string<pgvector::Vector>("[4e38]");
175175
});
176176

177177
assert_exception<pqxx::conversion_error>([] {
178178
auto unused = pqxx::from_string<pgvector::Vector>("[,]");
179-
});
179+
}, "Could not convert '' to float: Invalid argument.");
180180

181181
assert_exception<pqxx::conversion_error>([] {
182182
auto unused = pqxx::from_string<pgvector::Vector>("[1,]");
183-
});
183+
}, "Could not convert '' to float: Invalid argument.");
184184
}
185185

186186
void test_halfvec_to_string() {
@@ -205,19 +205,19 @@ void test_halfvec_from_string() {
205205

206206
assert_exception<pqxx::conversion_error>([] {
207207
auto unused = pqxx::from_string<pgvector::HalfVector>("[hello]");
208-
});
208+
}, "Could not convert 'hello' to float: Invalid argument.");
209209

210210
assert_exception<pqxx::conversion_error>([] {
211211
auto unused = pqxx::from_string<pgvector::HalfVector>("[4e38]");
212212
});
213213

214214
assert_exception<pqxx::conversion_error>([] {
215215
auto unused = pqxx::from_string<pgvector::HalfVector>("[,]");
216-
});
216+
}, "Could not convert '' to float: Invalid argument.");
217217

218218
assert_exception<pqxx::conversion_error>([] {
219219
auto unused = pqxx::from_string<pgvector::HalfVector>("[1,]");
220-
});
220+
}, "Could not convert '' to float: Invalid argument.");
221221
}
222222

223223
void test_sparsevec_to_string() {

0 commit comments

Comments
 (0)