예제 #1
0
        public virtual void testEncodeBitString()
        {
            IEncoder encoder = newEncoder();

            Assert.IsNotNull(encoder);
            printEncoded("TestBitStr test", encoder, coderTestUtils.createTestBitStr());
            checkEncoded(encoder, coderTestUtils.createTestBitStr(), coderTestUtils.createTestBitStrBytes());
        }
예제 #2
0
        public virtual void testDecodeBitStr()
        {
            IDecoder decoder = newDecoder();

            System.IO.MemoryStream stream = new System.IO.MemoryStream(coderTestUtils.createTestBitStrBytes());
            TestBitStr             val    = decoder.decode <TestBitStr>(stream);

            Assert.AreEqual(val.Value.TrailBitsCnt, coderTestUtils.createTestBitStr().Value.TrailBitsCnt);
            ByteTools.checkBuffers(val.Value.Value, coderTestUtils.createTestBitStr().Value.Value);
        }