Beispiel #1
0
        public void BlockSortTest007()
        {
            BlockSort bSort     = new BlockSort(new byte[] { 5 }, 1);
            int       markerpos = 1;

            bSort.Sort(ref markerpos);
        }
Beispiel #2
0
        public void BlockSortTest001()
        {
            BlockSort bSort     = new BlockSort();
            int       markerpos = 0;

            Assert.Throws <DjvuInvalidOperationException>(() => bSort.Sort(ref markerpos));
        }
Beispiel #3
0
        public void BlockSortValidate_Theory(string source, string expected)
        {
            byte[] sourceData   = Util.ReadFileToEnd(source);
            byte[] expectedData = Util.ReadFileToEnd(expected);
            byte[] buffer       = new byte[sourceData.Length + 1];
            Buffer.BlockCopy(sourceData, 0, buffer, 0, sourceData.Length);
            int markpos = sourceData.Length;

            BlockSort.BlockSortData(buffer, buffer.Length, ref markpos);

            for (int i = 0; i < expectedData.Length; i++)
            {
                Assert.Equal <uint>(expectedData[i], buffer[i]);
            }
        }
Beispiel #4
0
 public void BlockSortTest006()
 {
     BlockSort bSort = new BlockSort(new byte[10], 10);
 }