Skip to content

Generic tests: check for matching tag, not completely matching type #4172

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

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Feb 13, 2019

Previously these relied on base_type_eq to hide differently-decorated tags; after #4056 deletes that they will need to be explicit whether they seek an exact match or just to check the tag name.

@smowton smowton mentioned this pull request Feb 13, 2019
3 tasks
@@ -28,6 +28,9 @@ require_pointer(const typet &type, const optionalt<typet> &subtype);
const struct_tag_typet &
require_struct_tag(const typet &type, const irep_idt &identifier = "");

const pointer_typet
require_pointer_to_tag(const typet &type, const irep_idt &identifier = "");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use irep_idt() instead of "". (#4041 cleans this up for existing code.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@smowton smowton force-pushed the smowton/cleanup/generic-unit-test-type-checks branch from 138d2ff to 4866453 Compare February 13, 2019 11:05
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫
This PR failed Diffblue compatibility checks (cbmc commit: 138d2ff).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100755208
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

Previously these relied on base_type_eq to hide differently-decorated tags; now they explicitly
just check the tag name, rather than relying on base_type_eq, which will soon go away anyway, to
hide generic qualifiers and/or array element types.
@smowton smowton force-pushed the smowton/cleanup/generic-unit-test-type-checks branch from 4866453 to 363d217 Compare February 13, 2019 11:50
@smowton smowton merged commit 67f2e0c into diffblue:develop Feb 13, 2019
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: 363d217).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100767719

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

Successfully merging this pull request may close these issues.

3 participants