UTBotCpp icon indicating copy to clipboard operation
UTBotCpp copied to clipboard

[coreutils] Running tests for 'gnulib/lib/exclude.c' failed

Open operasfantom opened this issue 2 years ago • 3 comments

Steps to reproduce

  1. Open and configure project coreutils
  2. Choose target libcoreutils.a
  3. Generate tests for file gnulib/lib/exclude.c
  4. Run tests
  5. See logs

Initialisation of unnamed union (should be filtered out?)

Logs

/home/utbot/projects/coreutils/utbot_tests/gnulib/lib/exclude_test.cpp:446:97: error: expected unqualified-id
    struct exclude_segment utbotInnerVar1 = {NULL, exclude_hash, 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};

Code

TEST(error, free_exclude_test_1)
{
    struct exclude ex = {NULL, (struct pattern_buffer *) 18446744073709551615};
    struct exclude_segment utbotInnerVar1 = {NULL, exclude_hash, 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
    ex.head = &utbotInnerVar1;
    free_exclude(&ex);
    struct exclude expected_ex = {NULL, NULL};
}

Wrong name of enum

Logs

/home/utbot/projects/coreutils/utbot_tests/gnulib/lib/exclude_test.cpp:504:118: error: no enum named 'exclude_type' in 'UTBot::exclude_segment'
    struct exclude_segment utbotInnerVar1 = {(struct exclude_segment *) 16717361816799281152, (enum exclude_segment::exclude_type)(-232335864), 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};

Code

TEST(error, excluded_file_name_test_3)
{
    struct exclude ex = {NULL, (struct pattern_buffer *) 18446744073709551615};
    char f[] = "ccabcccccc";
    struct exclude_segment utbotInnerVar1 = {(struct exclude_segment *) 16717361816799281152, (enum exclude_segment::exclude_type)(-232335864), 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
    ex.head = &utbotInnerVar1;
    excluded_file_name(&ex, f);
}

operasfantom avatar Apr 18 '22 13:04 operasfantom