Skip to content

[BUG] Math header does not include if NAN appear in file with tests #432

@S1eGa

Description

@S1eGa

To Reproduce
Consider the following example:

struct Node {
  struct Node *next;
  float x;
};

int foo(struct Node *head) {
  if (head->next) {
    if (head->next->next) {
      return 2;
    }
    return 1;
  }
  return 0;
}

int main() {
}

We are trying to generate tests for function int foo().

Expected behavior
We expect to generate at least 2 tests that can be launched within gtest with any values in float x.

Actual behavior
Sometimes we can get NAN in structure instances, lazy instantiated too. But if the NAN don't appear in head and appear in lazy instantiated object, math header won't include in file with tests, and non-compiling code for tests will be generated.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions