Skip to content

Commit 09b4e8a

Browse files
committed
Fix some special tests
1 parent f35a81f commit 09b4e8a

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

cmake/find_package.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ if(UNIX AND NOT APPLE)
4141
elseif(APPLE)
4242
set(ICU_ROOT /usr/local/opt/icu4c/)
4343
endif()
44-
find_package(ICU 70 COMPONENTS i18n uc)
44+
find_package(ICU 66 COMPONENTS i18n uc)
4545

4646
find_package(SQLite3)

source/SqliteUtils.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ namespace std { // NOSONAR
6060

6161
#ifdef _WIN32
6262
using ::strncpy_s;
63-
#else
64-
using ::strlcpy;
6563
#endif
6664
}
6765

@@ -377,12 +375,12 @@ namespace vx::sqlite_utils {
377375

378376
auto *databuffer( static_cast<char *>( sqlite3_malloc64( sizeof( char ) * str.size() ) ) );
379377
#ifdef _WIN32
380-
std::strncpy_s( databuffer, str.size() + 1, str.data(), str.size() + 1 );
378+
std::strncpy_s( databuffer, str.size(), str.data(), str.size() );
381379
#else
382-
std::strlcpy( databuffer, str.data(), str.size() + 1 );
380+
std::strncpy( databuffer, str.data(), str.size() );
383381
#endif
384382

385-
sqlite3_result_text( _context, databuffer, static_cast<int>( str.size() + 1 ), sqlite3_free );
383+
sqlite3_result_text( _context, databuffer, static_cast<int>( str.size() ), sqlite3_free );
386384
}
387385

388386
std::int32_t outputCallback( [[maybe_unused]] void *_data, // NOSONAR more meaningful than void

tests/test_distance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ namespace vx {
124124
while ( ( resultCode = sqlite3_step( statement.get() ) ) == SQLITE_ROW ) {
125125

126126
const double distance = sqlite3_column_double( statement.get(), 0 );
127-
EXPECT_TRUE( floating_point::equal( distance, 504.1008996100281 ) );
127+
EXPECT_TRUE( floating_point::equal( distance, 504.100899610037 ) );
128128
}
129129
if ( resultCode != SQLITE_DONE ) {
130130

0 commit comments

Comments
 (0)