Skip to content

Commit 9771322

Browse files
committed
Fixed CI
1 parent d347667 commit 9771322

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/pqxx_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void test_precision(pqxx::connection &conn) {
130130
before_each(conn);
131131

132132
pqxx::nontransaction tx{conn};
133-
pgvector::Vector embedding{{1.23456789, 0, 0}};
133+
pgvector::Vector embedding{{1.23456789f, 0, 0}};
134134
tx.exec("INSERT INTO items (embedding) VALUES ($1)", {embedding});
135135
tx.exec("SET extra_float_digits = 3");
136136
pqxx::result res = tx.exec("SELECT embedding FROM items ORDER BY id DESC LIMIT 1");
@@ -139,7 +139,7 @@ void test_precision(pqxx::connection &conn) {
139139

140140
void test_vector_to_string() {
141141
assert_equal(pqxx::to_string(pgvector::Vector{{1, 2, 3}}), "[1,2,3]");
142-
assert_equal(pqxx::to_string(pgvector::Vector{{-1.234567890123}}), "[-1.2345679]");
142+
assert_equal(pqxx::to_string(pgvector::Vector{{-1.234567890123f}}), "[-1.2345679]");
143143

144144
assert_exception<pqxx::conversion_overrun>([] {
145145
pqxx::to_string(pgvector::Vector{std::vector<float>(16001)});
@@ -178,9 +178,9 @@ void test_vector_from_string() {
178178
void test_halfvec_to_string() {
179179
assert_equal(pqxx::to_string(pgvector::HalfVector{{1, 2, 3}}), "[1,2,3]");
180180
#if __STDCPP_FLOAT16_T__ || defined(__FLT16_MAX__)
181-
assert_equal(pqxx::to_string(pgvector::HalfVector{{static_cast<pgvector::Half>(-1.234567890123)}}), "[-1.234375]");
181+
assert_equal(pqxx::to_string(pgvector::HalfVector{{static_cast<pgvector::Half>(-1.234567890123f)}}), "[-1.234375]");
182182
#else
183-
assert_equal(pqxx::to_string(pgvector::HalfVector{{-1.234567890123}}), "[-1.2345679]");
183+
assert_equal(pqxx::to_string(pgvector::HalfVector{{-1.234567890123f}}), "[-1.2345679]");
184184
#endif
185185

186186
assert_exception<pqxx::conversion_overrun>([] {
@@ -219,7 +219,7 @@ void test_halfvec_from_string() {
219219

220220
void test_sparsevec_to_string() {
221221
assert_equal(pqxx::to_string(pgvector::SparseVector{{1, 0, 2, 0, 3, 0}}), "{1:1,3:2,5:3}/6");
222-
std::unordered_map<int, float> map{{999999999, -1.234567890123}};
222+
std::unordered_map<int, float> map{{999999999, -1.234567890123f}};
223223
assert_equal(pqxx::to_string(pgvector::SparseVector{map, 1000000000}), "{1000000000:-1.2345679}/1000000000");
224224

225225
assert_exception<pqxx::conversion_overrun>([] {

0 commit comments

Comments
 (0)