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

[DSSv3] Fix issue - 16339 #8181

Merged
merged 2 commits into from Jul 30, 2021
Merged

Conversation

lucica28
Copy link
Contributor

std.array.insertInPlace: added tests for class and union.

@dlang-bot
Copy link
Contributor

dlang-bot commented Jul 26, 2021

Thanks for your pull request and interest in making D better, @lucica28! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
16339 trivial insertInPlace should be tested for unions and classes

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8181"

std/array.d Outdated
@@ -1364,13 +1364,46 @@ if (isSomeString!(T[]) && allSatisfy!(isCharOrStringOrDcharRange, U))
}

///
@safe pure unittest
@system unittest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Before this addition, the unittest tested that the code is both @safe and pure. With this addition the first paragraph no longer tests that. Ideally, the added tests should be pure and @safe; if that is not possible, then just create a new unittest block that is @System. (from looking at the code, I don't see why purity is lost; also, the class example should be @safe)

@dlang-bot dlang-bot merged commit 95c0aa6 into dlang:master Jul 30, 2021
ljmf00 pushed a commit to ljmf00/phobos that referenced this pull request Aug 23, 2021
[DSSv3] Fix issue - 16339

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
ljmf00 pushed a commit to ljmf00/phobos that referenced this pull request Aug 23, 2021
[DSSv3] Fix issue - 16339

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
ljmf00 pushed a commit to ljmf00/phobos that referenced this pull request Aug 23, 2021
[DSSv3] Fix issue - 16339

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants