-
Notifications
You must be signed in to change notification settings - Fork 157
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 support for byte[] properties #567
Conversation
|
||
public IEnumerable<object[]> SetAndReplaceWithNullCases() | ||
{ | ||
yield return new object[] { "NullableCharProperty", '0' }; |
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 like copy and paste error - shouldn't these all be null?
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.
This test first sets the property to a non-null value and asserts the getter returns the value, and then sets the property to null and asserts that the getter returns null.
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.
OK, yup noted it now.
👍 |
69468b6
to
50f9f6f
Compare
if (buffer.Length == 0) | ||
{ | ||
// see RealmObject.SetByteArrayValue | ||
NativeQuery.binary_equal(queryHandle, columnIndex, (IntPtr)0x1, IntPtr.Zero); |
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.
I'm bothered by this 0x1
magic value being repeated as a literal. Does it have significance and, if so, could it be a constant?
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.
No, it just has to be anything but zero, as long as the length is zero. Seeing as how it's a dummy value I wouldn't bother with a constant.
👍 with the added check for empty byte arrays! |
👍 |
Implements #510