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

Json representation of string values in test suites #8478

Open
Stevendeo opened this issue Oct 2, 2024 · 0 comments
Open

Json representation of string values in test suites #8478

Stevendeo opened this issue Oct 2, 2024 · 0 comments

Comments

@Stevendeo
Copy link

CBMC version: 6.2.0 & 6.3.1
Operating system: Ubuntu 20.04
Exact command line resulting in the issue:
$ cbmc test_str.c --cover cover --show-test-suite --json-ui

with test_str.c:

int f(char* s) {
  if (s == "foo") {
    __CPROVER_cover(1);
    return 1;
  }
  return 0;
}

int main(){
  char* str;
  __CPROVER_input("str", str);
  return (f (str));
}

What behaviour did you expect:

The command without --json-ui ($ cbmc test_str.c --cover cover --show-test-suite`) returns the following:

** 1 of 1 covered (100.0%)

Test suite:
str="foo"

I expected the --json-ui to return the same.

What happened instead:

CBMC returns the following test suite in json format:

{
  "coveredGoals": [ "f.coverage.1" ],
  "inputs": [
    {
      "id": "str",
      "value": {
        "name": "unknown"
      }
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant