Skip to content

Commit

Permalink
[tests] fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwillow committed Dec 23, 2024
1 parent ec10d7e commit 99cbe10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Vietnamese_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ TEST(Vietnamese, ConvertFuzz) {

const int count = 1024;
std::string randUtf8Str;
std::default_random_engine eng(std::chrono::high_resolution_clock::now().time_since_epoch().count());
std::default_random_engine eng(
static_cast<unsigned char>(std::chrono::high_resolution_clock::now().time_since_epoch().count()));
std::uniform_int_distribution<int> unif(0, viet::internal::TABLE_LENGTH - 1);
for (int i = 0; i < count; ++i) {
int index = unif(eng);
Expand Down Expand Up @@ -191,7 +192,8 @@ TEST(Vietnamese, ConvertWithUTF16LEFuzz) {

const int count = 1024;
std::u16string randUtf16LEStr;
std::default_random_engine eng(std::chrono::high_resolution_clock::now().time_since_epoch().count());
std::default_random_engine eng(
static_cast<unsigned char>(std::chrono::high_resolution_clock::now().time_since_epoch().count()));
std::uniform_int_distribution<int> unif(0, viet::internal::TABLE_LENGTH - 1);
for (int i = 0; i < count; ++i) {
int index = unif(eng);
Expand Down

0 comments on commit 99cbe10

Please sign in to comment.