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
DM-19582: Add cross-language GenericMap unit tests #486
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C++ considers int, long, and long long fundamentally different types (even though in practice two of the three will be identical), so one of the three does not map correctly to either int32_t or int64_t.
Inexact matching was previously documented only in the CLO announcement and the design documentation.
TallJimbo
approved these changes
Sep 18, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Only very minor in-line comments.
This commit fixes a bug where Storable values could not be read from Python.
The garbage collection bug is a significant restriction on Storable, and providing a non-passing unit test makes this fact more self-documenting.
kfindeisen
force-pushed
the
tickets/DM-19582
branch
from
September 20, 2019 18:56
1ec8605
to
d7581c2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds unit tests to
GenericMap
that pass objects from Python to C++ and/or vice versa. This exposes behavior that was not adequately tested with previous tests.Bugs fixed:
afw
with Scons no longer issues an "ignoring a non-existent file" warningGenericMap
's policy on type conversions is now explicitly described in the API docsint
, nor Python floats tofloat
, when inserted into aGenericMap
(but see DM-21268, below)Storable
values (i.e., non-pointers) can now be retrieved from aGenericMap
in PythonBugs deferred:
GenericMap
's weakly-typedinsert
method turns C-strings intobool
[DM-21216].GenericMap
cannot consistently handle integers and floats from Python, particularly Numpy's explicit-length types [DM-21268].Storable
may be prematurely garbage-collected [DM-21314].