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

Minor cleanup/improvements in unique_ptr_test #1266

Merged
merged 4 commits into from
Sep 1, 2024

Conversation

mrdomino
Copy link
Collaborator

@mrdomino mrdomino commented Aug 28, 2024

I'd previously introduced a bunch of small wrappers around the class and functions under test to avoid excessive cpp use, but we can achieve this more expediently with simple using-declarations. This also cuts out some over-specified tests (e.g. there's no reason a stateful deleter wouldn't compile.)

- Uses the same name as the namespaced type for the declarations.

- Removes the stateful deleter test case and corresponding type.

- Explains the reasoning behind the instrumented lifecycle types thad it
  didn't seem practical to remove.

- Uncomments the #undef ctl since it is at worst a no-op.

- Adds tests for the very basic functionality of a unique_ptr, i.e. that
  it is deleted on leaving scope.

- SetsGDeleter now doesn't delete the object, and the tests that rely on
  it use pointers to memory that doesn't need to be deleted.

- Comments a few of the basic test cases.
@mrdomino mrdomino requested a review from jart August 28, 2024 01:34
@mrdomino mrdomino marked this pull request as draft August 28, 2024 18:59
@mrdomino mrdomino removed the request for review from jart August 28, 2024 18:59
@mrdomino mrdomino requested a review from jart August 31, 2024 23:07
@mrdomino mrdomino marked this pull request as ready for review August 31, 2024 23:07
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

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

Thank you!

@jart jart merged commit 48b703b into jart:master Sep 1, 2024
6 checks passed
@mrdomino mrdomino deleted the ctl-unique-test branch September 2, 2024 04:33
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.

2 participants