Open
Description
Description
Sometimes when target is explicitly selected UTBot generates two test with identical steps, but with different expected results.
To Reproduce
Steps to reproduce the behavior:
- Open
c-example
project - Enable
Use Stubs
option - Select
libsrc.a
target - Generate tests for
src/calc.c#other_module_call
function
Expected behavior
One regression test is generated, because libfunc
just returns constant value 10
. Also if user selected UTBot: Auto
target, then only one test is generated as expected.
Actual behavior
Two tests are generated with the same parameter calls, but different expected results, like this:
TEST(regression, other_module_call_test_1)
{
int actual = other_module_call(0);
EXPECT_EQ(2, actual);
}
TEST(regression, other_module_call_test_2)
{
int actual = other_module_call(0);
EXPECT_EQ(1, actual);
}
Additional context
Also dependence on Target option value looks suspicion.
Metadata
Metadata
Assignees
Type
Projects
Status
Todo