Description
During test generation UTBot used to substitute stdin with own construction, now it does not anymore, so tests with user input fail.
To Reproduce
Steps to reproduce the behavior:
- Open
c-examples from UTBotCPP project
- Generate tests for
int simple_getc() function in file input_output.c
Expected behavior
Previously tests looked like this:
TEST(regression, simple_getc_test_1)
{
char stdin_buf[] = "\"""";
int utbot_redirect_stdin_status = 0;
utbot_redirect_stdin(stdin_buf, utbot_redirect_stdin_status);
if (utbot_redirect_stdin_status != 0) {
FAIL() << "Unable to redirect stdin.";
}
int actual = simple_getc();
EXPECT_EQ(-1, actual);
}
Actual behavior
Now utbot_redirect_stdin initialization part disappeared and test looks like this:
TEST(regression, simple_getc_test_1)
{
int actual = simple_getc();
EXPECT_EQ(9, actual);
}
Description
During test generation UTBot used to substitute stdin with own construction, now it does not anymore, so tests with user input fail.
To Reproduce
Steps to reproduce the behavior:
c-examplesfromUTBotCPPprojectint simple_getc()function in fileinput_output.cExpected behavior
Previously tests looked like this:
Actual behavior
Now
utbot_redirect_stdininitialization part disappeared and test looks like this: