@@ -142,7 +142,7 @@ void test_vector_to_string() {
142142 assert_equal (pqxx::to_string (pgvector::Vector{{-1.234567890123 }}), " [-1.2345679]" );
143143
144144 assert_exception<pqxx::conversion_overrun>([] {
145- pqxx::to_string (pgvector::Vector ( std::vector<float >(16001 )) );
145+ pqxx::to_string (pgvector::Vector{ std::vector<float >(16001 )} );
146146 }, " vector cannot have more than 16000 dimensions" );
147147}
148148
@@ -176,15 +176,15 @@ void test_vector_from_string() {
176176}
177177
178178void test_halfvec_to_string () {
179- assert_equal (pqxx::to_string (pgvector::HalfVector ({ 1 , 2 , 3 }) ), " [1,2,3]" );
179+ assert_equal (pqxx::to_string (pgvector::HalfVector{{ 1 , 2 , 3 }} ), " [1,2,3]" );
180180#if __STDCPP_FLOAT16_T__ || defined(__FLT16_MAX__)
181181 assert_equal (pqxx::to_string (pgvector::HalfVector{{static_cast <pgvector::Half>(-1.234567890123 )}}), " [-1.234375]" );
182182#else
183183 assert_equal (pqxx::to_string (pgvector::HalfVector{{-1.234567890123 }}), " [-1.2345679]" );
184184#endif
185185
186186 assert_exception<pqxx::conversion_overrun>([] {
187- pqxx::to_string (pgvector::HalfVector ( std::vector<pgvector::Half>(16001 )) );
187+ pqxx::to_string (pgvector::HalfVector{ std::vector<pgvector::Half>(16001 )} );
188188 }, " halfvec cannot have more than 16000 dimensions" );
189189}
190190
@@ -223,7 +223,7 @@ void test_sparsevec_to_string() {
223223 assert_equal (pqxx::to_string (pgvector::SparseVector{map, 1000000000 }), " {1000000000:-1.2345679}/1000000000" );
224224
225225 assert_exception<pqxx::conversion_overrun>([] {
226- pqxx::to_string (pgvector::SparseVector ( std::vector<float >(16001 , 1 )) );
226+ pqxx::to_string (pgvector::SparseVector{ std::vector<float >(16001 , 1 )} );
227227 }, " sparsevec cannot have more than 16000 dimensions" );
228228}
229229
0 commit comments