You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
If struct contains union of unnamed type, then in some cases generated tests can contain cast to union of unnamed type. Thus tests cannot be run.
Example
structStructWithUnionOfUnnamedType {
union {
int x;
struct {
char c;
double d;
} ds;
longlong *ptr;
} un;
};
structStructWithUnionOfUnnamedTypestruct_with_union_of_unnamed_type_as_return_type(int a, int b) {
structStructWithUnionOfUnnamedType ans;
if (a > b) {
ans.un.ptr = 0;
} elseif (a < b) {
ans.un.x = 153;
} else {
ans.un.ds.c = 'k';
ans.un.ds.d = 1.0101;
}
return ans;
}
To Reproduce
Steps to reproduce the behavior:
Copy the example above in your project.
Generate tests for function struct_with_union_of_unnamed_type_as_return_type.
Try to run generated tests.
Expected behavior
Tests are supposed to be executed successfully.
Actual behavior
An error test is generated with information about errors.
Description
If struct contains union of unnamed type, then in some cases generated tests can contain cast to union of unnamed type. Thus tests cannot be run.
Example
To Reproduce
Steps to reproduce the behavior:
struct_with_union_of_unnamed_type_as_return_type
.Expected behavior
Tests are supposed to be executed successfully.
Actual behavior
An error test is generated with information about errors.
Generated test
Logs
The text was updated successfully, but these errors were encountered: