Skip to content
New issue

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

Not generate tests with extern variable [BUG] #514

Closed
ladisgin opened this issue Oct 24, 2022 · 0 comments · Fixed by #522
Closed

Not generate tests with extern variable [BUG] #514

ladisgin opened this issue Oct 24, 2022 · 0 comments · Fixed by #522
Assignees
Labels
bug Something isn't working

Comments

@ladisgin
Copy link
Member

To Reproduce
Try generate tests for next code

int abs(int a){
    if (a < 0) {
        return -1 * a;
    }
    return a;
}

#define MAX_INDEX 10

extern unsigned g_arrayNumber[MAX_INDEX];

unsigned GetNum(unsigned index)
{
    return g_arrayNumber[index];
}

Test not generated

in UTBot logs
2022-10-24 13:22:25.130 [utbot-B29P ] RunKleeTask.cpp:60 1| . . KLEE: ERROR: Unable to load symbol(g_arrayNumber) while initializing globals

@ladisgin ladisgin added the bug Something isn't working label Oct 24, 2022
@korifey korifey moved this to Todo in UTBot C/C++ Oct 24, 2022
@Lana243 Lana243 moved this from Todo to In Progress in UTBot C/C++ Oct 26, 2022
Lana243 added a commit that referenced this issue Nov 28, 2022
Add support for external variables
Repository owner moved this from In Progress to Done in UTBot C/C++ Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants