Skip to content

Commit e07ca58

Browse files
committed
Updated style [skip ci]
1 parent 3a9ace9 commit e07ca58

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/pqxx_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

178178
void 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

Comments
 (0)