UTBotCpp
UTBotCpp copied to clipboard
[BUG] 'unsigned long' type instead of 'size_t' for 'actual' and 'expected' variables
To Reproduce Steps to reproduce the behavior:
- Enable Verbose Formatting for UTBot
- Generate tests for following code
size_t min_size_t(size_t a, size_t b) {
if (a < b) {
return a;
}
return b;
}
Actual behavior Generated test is:
TEST(regression, min_size_t_test_1)
{
// Construct input
size_t a = 0UL;
size_t b = 1UL;
// Expected output
unsigned long expected = 0UL;
// Trigger the function
unsigned long actual = min_size_t(a, b);
// Check results
EXPECT_EQ(expected, actual);
}
Expected behavior
Expected that both expected and actual variables would be of size_t type:
TEST(regression, min_size_t_test_1)
{
// Construct input
size_t a = 0UL;
size_t b = 1UL;
// Expected output
size_t = 0UL;
// Trigger the function
size_t = min_size_t(a, b);
// Check results
EXPECT_EQ(expected, actual);
}