Example #1
0
        public void TestGetLength()
        {
            var fp1 = new Fingerprint(99);

            Assert.Equal(99, fp1.Length);

            var blen = fp1.GetLength();

            var lengthInBytes    = (((fp1.Length - 1) >> 3) + 1);
            var expectedBytesLen = lengthInBytes + Serializer.GetLengthNonnegative(99);

            Assert.Equal(expectedBytesLen, blen);
        }
Example #2
0
        public void TestGetLength()
        {
            var fp1 = new Fingerprint(99);

            Assert.AreEqual(99, fp1.Length);

            var blen = fp1.GetLength();

            var lengthInBytes = (((fp1.Length - 1) >> 3) + 1);
            var expectedBytesLen = lengthInBytes  + Serializer.GetLengthVariableNonnegative(99);

            Assert.AreEqual(expectedBytesLen, blen);
        }