UTBotCpp
UTBotCpp copied to clipboard
Generated two tests with the same input and different output [BUG]
Description Suspicious tests are generated for simple C++ code.
To Reproduce Steps to reproduce the behavior:
- Open UTBot online
- Choose C++
- Paste code
#include <cmath>
#include <cstring>
#include <vector>
using namespace std;
int foo(std::vector<int> v)
{
// TODO: write your code here
return 0;
}
- Generate and run tests
Expected behavior One regression test is supposed to be generated.
Actual behavior One regression and one error test are generated.
Visual proofs (screenshots, logs)
/*
* This file is automatically generated by UnitTestBot. For further information seehttps://unittestbot.org
*/
#include "snippet_dot_cpp_test.h"
#include "gtest/gtest.h"
#include "access_private.hpp"
namespace UTBot {
static const float utbot_abs_error = 1e-6;
#pragma region regression
TEST(regression, foo_test_1)
{
int actual = foo({
});
EXPECT_EQ(0, actual);
}
#pragma endregion
#pragma region error
TEST(error, foo_test_2)
{
foo({
});
}
#pragma endregion
}
Environment UTBot Online.
Additional context No context.