示例#1
0
        public void Load1()
        {
            var x = Span128.Load(span <int>(1, 2, 3, 4, 5, 6, 7, 8));

            Claim.eq(x.BlockCount, 2);
            x.ClaimEqual(Span128.FromParts(1, 2, 3, 4, 5, 6, 7, 8));
        }
示例#2
0
        public void BlockSlice()
        {
            var x = Span128.Load(span <int>(1, 2, 3, 4, 5, 6, 7, 8));

            var block0 = x.SliceBlock(0);

            Claim.eq(4, block0.Length);
            block0.ClaimEqual(Span128.Load(span(1, 2, 3, 4)));

            var block2 = x.SliceBlock(1);

            Claim.eq(4, block2.Length);
            block2.ClaimEqual(Span128.FromParts(5, 6, 7, 8));
        }