Пример #1
0
        public void DuplicateTest002()
        {
            InterWaveBlock block = new InterWaveBlock();

            Assert.NotNull(block._PData);
            Assert.NotNull(InterWaveBlock._Zigzagloc);

            short[][][] pdata = block._PData;

            InitializePData(pdata);

            var block2 = block.Duplicate();

            Assert.NotNull(block2);
            Assert.NotNull(block2._PData);

            pdata = block2._PData;
            for (int i = 0; i < pdata.Length; i++)
            {
                short[][] pdatai = pdata[i];
                Assert.Equal(16, pdatai.Length);

                for (int j = 0; j < 16; j++)
                {
                    short[] pdataij = pdatai[j];
                    Assert.Equal(16, pdataij.Length);

                    for (int k = 0; k < 16; k++)
                    {
                        Assert.Equal(0, pdataij[k]);
                    }
                }
            }
        }
Пример #2
0
        public void DuplicateTest001()
        {
            InterWaveBlock block = new InterWaveBlock();

            Assert.NotNull(block._PData);
            Assert.NotNull(InterWaveBlock._Zigzagloc);
            block._PData = null;

            var block2 = block.Duplicate();

            Assert.Null(block2);
        }