-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
If project contains enum with name given by typedef:
typedef enum {
EVEN,
ODD
} Parity;
And structs, something like:
struct WrapperStruct {
Parity p;
};
struct PointerStruct {
struct WrapperStruct* wrapperStruct;
};
int parityToInt(struct PointerStruct* s) {
struct WrapperStruct* w = s->wrapperStruct;
Parity parity = w->p;
if (parity == EVEN) {
return 0;
}
return 1;
}
Then generated test can contain lazy instantiated variable:
struct WrapperStruct utbotInnerVar1 = {
.p = (enum Parity)(507720632)
};
As a result the test cannot be run.
To Reproduce
Steps to reproduce the behavior:
- Add example from description in your project.
- Generate for function ParityToInt.
- See that generated test looks like example above (constant may be different).
Expected behavior
Test is supposed to be generated and executed.
Actual behavior
Test cannot be executed.
Visual proofs (screenshots, logs)
error: typedef 'Parity' cannot be referenced with a enum specifier
.p = (enum Parity)(507720632)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done