Exemplo n.º 1
0
        public void SourceTypeLargerThanTargetOneCorrectlyCalcsTargetsLength(int sourceLength)
        {
            var sourceSlice = new SevenBytesStruct[sourceLength].Slice();

            var targetSlice = sourceSlice.Cast <SevenBytesStruct, short>();

            Assert.Equal((sourceLength * 7) / sizeof(short), targetSlice.Length);
        }
Exemplo n.º 2
0
        public void SourceTypeLargerThanTargetOneCorrectlyCalcsTargetsLength(int sourceLength)
        {
            var sourceSlice = new SevenBytesStruct[sourceLength].Slice();

            var targetSlice = sourceSlice.Cast<SevenBytesStruct, short>();

            Assert.Equal((sourceLength * 7) / sizeof(short), targetSlice.Length);
        }