Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18588

.NET: Thin 3.0: BinaryTupleReader incorrect behavior on type mismatch

    XMLWordPrintableJSON

Details

    Description

      Add the following test to BinaryTupleTests:

      [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));
      }
      

      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.

      Attachments

        Activity

          People

            ptupitsyn Pavel Tupitsyn
            ptupitsyn Pavel Tupitsyn
            Igor Sapego Igor Sapego
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m