Description
In many cases UTBot generates test data which contains identical values. While formally it leads to required coverage it is less useful than could be with different values.
For instance here is swap function:
void swap(int *a, int *b) {
int t = *a;
*a = *b;
*b = t;
}
UTBot generates following test:
TEST(regression, swap_test_1)
{
int a = 0;
int b = 0;
swap(&a, &b);
int expected_a = 0;
EXPECT_EQ(expected_a, a);
int expected_b = 0;
EXPECT_EQ(expected_b, b);
}
Obviously it cannot detect many potential issues in the code which could be introduced later. Should we force UTbot to generate unique values whenever it's possible, such tests would be more powerful.
Description
In many cases UTBot generates test data which contains identical values. While formally it leads to required coverage it is less useful than could be with different values.
For instance here is swap function:
UTBot generates following test:
Obviously it cannot detect many potential issues in the code which could be introduced later. Should we force UTbot to generate unique values whenever it's possible, such tests would be more powerful.