-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add singleton tests (Failure is expected) #110
Conversation
a782726
to
37a64b2
Compare
@robertramey This is ready for review. Reason:
singleton<> is responsible for setting the flag:
singleton_wrapper is not related to singleton<> the latter is never instantiated and hence never destroyed.
To be completely correct: |
I made a branch containing a fix: https://travis-ci.org/res2k/serialization/builds/422500391 |
Why? What was wrong with mine: e1b6894 (already in #105 consisting of the 2 tests (this and #111) and the fix in 2 additional commits) It also fixes all those wrong comments and typos and explains what is going on so the next person wanting to change this is aware of it. Only difference I (may) like is that you fully put the wrapper class inside of the function. Might be worth it, but having it in an extra namespace makes it look cleaner. Oh and you did not protect the singleton ctor too leading to potential for misuse. Don't get me wrong, if those visibility fixes solve #111 then great! But why redo my work that is already here? |
For one, my fix was semi-accidental - I noticed the wrong placement of the Though, generally I collected the changes, your tests etc on a branch to have them run through CI, not to have them merge-ready. (For the same reason I didn't bother with pulling the additional changes to the test.) Finally, I'm quite grateful for your test cases - they help me to validate the visibility stuff for some cases the current unit tests don't quite cover. So maybe they didn't result in any net saving for me, but they help with making a better patch ;) |
👍 for noticing the wrong placement independently! (Seriously! People have been moving stuff around w/o really knowing what they are doing leading to this mess) Suggestion: Merge #110 and #111 into your branch just as I did in #105, then you don't have separate changes and the expanded test-matrix to validate your visibility changes. |
From @robertramey
There is a function
This is what I also said on why I removed this test:
These tests fail as can be seen by CI: |
37a64b2
to
fed6a16
Compare
fed6a16
to
56224d7
Compare
56224d7
to
462c11e
Compare
Closed in favor of simpler #129 |
Spinoff of #105
This adds additional test variants and also builds tests of feature branches on appveyor.
The main contribution is the test of the
singleton::is_destroyed
behaviour:is_destroyed
returnstrue
if, and only if` the singleton is destroyedThis should prevent regressions when changing the implementation details of
singleton