package me.lemire.integercompression;

import org.junit.Test;
import static org.junit.Assert.*;

import static me.lemire.integercompression.TestUtils.*;

/**
 * Collection of adhoc tests.
 */
public class AdhocTest
{

    @Test
    public void biggerCompressedArray0() {
        // No problem: for comparison.
        IntegerCODEC c = new Composition(new FastPFOR(), new VariableByte());
        assertSymmetry(c, 0, 16384);
    }

    @Test
    public void biggerCompressedArray1() {
        // Compressed array is bigger than original, because of VariableByte.
        IntegerCODEC c = new VariableByte();
        assertSymmetry(c, -1);
    }

    @Test
    public void biggerCompressedArray2() {
        // Compressed array is bigger than original, because of Composition.
        IntegerCODEC c = new Composition(new FastPFOR(), new VariableByte());
        assertSymmetry(c, 65535, 65535);
    }

}

@@ -32,16 +32,42 @@
 ssion;%0A%0A
+import java.util.Arrays;%0A%0A
 import o
@@ -921,10 +921,291 @@
 %0A    %7D%0A%0A
+    // NOTE: This require bigger 2 items for compressed array than original.%0A    /*%0A    @Test%0A    public void overflowVariableByte() %7B%0A        IntegerCODEC c = new VariableByte();%0A        int%5B%5D d = new int%5B8%5D;%0A        Arrays.fill(d, -1);%0A        assertSymmetry(c, d);%0A    %7D%0A    */%0A
 %7D%0A

add an error case