Skip to content

Commit

Permalink
Test fixes:
Browse files Browse the repository at this point in the history
Fixed warning (int/size_t)
Fixed error message
  • Loading branch information
9EOR9 committed Jan 24, 2022
1 parent 3812207 commit 8aa0ffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion unittest/libmariadb/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ static int test_get_options(MYSQL *unused __attribute__((unused)))
const char *attr_val[] = {"bar1", "bar2", "bar3"};
char **key, **val;

for (i=0; i < sizeof(options_int)/sizeof(int); i++)
for (i=0; i < (int)(sizeof(options_int)/sizeof(int)); i++)
{
mysql_options(mysql, options_int[i], &intval[0]);
intval[1]= 0;
Expand Down
8 changes: 5 additions & 3 deletions unittest/libmariadb/ps_bugs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5001,9 +5001,11 @@ static int test_conc_fraction(MYSQL *mysql)

expected= i > 6 ? 123456 : frac * (unsigned int)powl(10, (6 - i));

diag("tm.second_part=%ld expected=%ld", tm.second_part, expected);
FAIL_IF(tm.second_part != expected, "expected fractional part to be 900000");

if (tm.second_part != expected)
{
diag("Error: tm.second_part=%ld expected=%ld", tm.second_part, expected);
return FAIL;
}
}
mysql_stmt_close(stmt);
return OK;
Expand Down

0 comments on commit 8aa0ffd

Please sign in to comment.