We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated tests for function can't be compiled
char* reverse_str(char* str) { int n = strlen(str); char* reversed = malloc(n + 1); for (int i = 0; i < n; i++) { reversed[i] = str[n - 1 - i]; } reversed[n] = '\0'; return reversed; }
Tests
TEST(regression, reverse_str_test1) { char str[] = {'c', '\0', 'c', 'c', 'c', 'c', 'c', 'c', 'c', '\0'}; char * actual = reverse_str(str); char expected[] = "c"; for (int it_10_0 = 0; it_10_0 < 1; it_10_0 ++) { EXPECT_EQ(actual[it_10_0], "c"); } char expected_str[] = {'c', '\0', 'c', 'c', 'c', 'c', 'c', 'c', 'c', '\0'}; for (int it_11_0 = 0; it_11_0 < 10; it_11_0 ++) { EXPECT_EQ(expected_str[it_11_0], str[it_11_0]); } }
In line EXPECT_EQ(actual[it_10_0], "c"); comparing char with string literal
EXPECT_EQ(actual[it_10_0], "c");
The text was updated successfully, but these errors were encountered:
ladisgin
Successfully merging a pull request may close this issue.
Generated tests for function can't be compiled
Tests
In line
EXPECT_EQ(actual[it_10_0], "c");
comparing char with string literalThe text was updated successfully, but these errors were encountered: