[
https://issues.apache.org/jira/browse/IGNITE-18588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn updated IGNITE-18588:
------------------------------------
Description:
Add the following test to *BinaryTupleTests*:
{code:csharp}
[Test]
public void TestShortAsByte()
{
var bytes = Build((ref BinaryTupleBuilder b) => b.AppendShort(257));
var reader = new BinaryTupleReader(bytes, 1);
Assert.AreEqual(257, reader.GetByte(0));
}
{code}
The result is assertion failure "Expected: 257 But was: 1" - we get incorrect
value, but there should be an exception when the data does not fit into the
requested type.
> .NET: Thin 3.0: BinaryTupleReader incorrect behavior on type mismatch
> ---------------------------------------------------------------------
>
> Key: IGNITE-18588
> URL: https://issues.apache.org/jira/browse/IGNITE-18588
> Project: Ignite
> Issue Type: Bug
> Components: platforms, thin client
> Affects Versions: 3.0.0-beta1
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: .NET, ignite-3
> Fix For: 3.0.0-beta2
>
>
> Add the following test to *BinaryTupleTests*:
> {code:csharp}
> [Test]
> public void TestShortAsByte()
> {
> var bytes = Build((ref BinaryTupleBuilder b) => b.AppendShort(257));
> var reader = new BinaryTupleReader(bytes, 1);
> Assert.AreEqual(257, reader.GetByte(0));
> }
> {code}
> The result is assertion failure "Expected: 257 But was: 1" - we get
> incorrect value, but there should be an exception when the data does not fit
> into the requested type.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)