示例#1
0
        override public void Run()
        {
            BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2);
            bc.Reset(2, 1);

            if(bc.Length != 1)
            {
                throw new TestCaseException("unexpected length");
            }
        }
示例#2
0
        override public void Run()
        {
            BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2);
            bc.Reset(2, 1);

            if(bc.Index != 2)
            {
                throw new TestCaseException("unexpected index");
            }
        }
示例#3
0
 override public void Run()
 {
     BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2);
     bc.Reset(0, 1);
 }
示例#4
0
        override public void Run()
        {
            BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2);

            try
            {
                bc.Reset(2, 2);
                throw new TestCaseException("index + length > buffer.Length");
            }
            catch(ArgumentOutOfRangeException){}
        }
示例#5
0
        override public void Run()
        {
            BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2);

            try
            {
                bc.Reset(0, -1);
                throw new TestCaseException("length cannot be < 0");
            }
            catch(ArgumentException){}
        }