package water.fvec;

import org.testng.AssertJUnit;
import org.testng.annotations.Test;
import water.TestUtil;
import java.util.Arrays;

public class C1ChunkTest extends TestUtil {
  @Test void test_inflate_impl() {
    NewChunk nc = new NewChunk(null, 0);
    nc.addNum(0,0);
    nc.addNum(1,0);
    nc.addNum(3,0);
    nc.addNum(254,0);
    nc.addNA();
    Chunk cc = nc.compress();
    AssertJUnit.assertTrue(cc instanceof C1Chunk);
    NewChunk nc2 = new NewChunk(null, 0);
    nc2 = cc.inflate_impl(nc2);
    Chunk cc2 = nc2.compress();
    AssertJUnit.assertTrue(cc2 instanceof C1Chunk);
    AssertJUnit.assertTrue(Arrays.equals(cc._mem, cc2._mem));
  }
}

@@ -254,71 +254,70 @@
 0);%0A
+%0A
     
-nc.addNum(0,0);%0A    nc.addNum(1,0);%0A    nc.addNum(3,0);%0A   
+int%5B%5D vals = new int%5B%5D%7B0,1,3,254%7D;%0A    for (int v : vals)
  nc.
@@ -323,19 +323,17 @@
 .addNum(
-254
+v
 ,0);%0A   
@@ -341,24 +341,25 @@
 nc.addNA();%0A
+%0A
     Chunk cc
@@ -402,194 +402,537 @@
 sert
-True(cc instanceof C1Chunk);%0A    NewChunk nc2 = new NewChunk(null, 0);%0A    nc2 = cc.inflate_impl(nc2);%0A    Chunk cc2 = nc2.compress();%0A    AssertJUnit.assertTrue(cc2 instanceof C1Chunk);
+Equals(vals.length+1, cc.len());%0A    AssertJUnit.assertTrue(cc instanceof C1Chunk);%0A    for (int i=0;i%3Cvals.length;++i) AssertJUnit.assertEquals(vals%5Bi%5D, cc.at80(i));%0A    AssertJUnit.assertTrue(cc.isNA0(vals.length));%0A%0A    Chunk cc2 = cc.inflate_impl(new NewChunk(null, 0)).compress();%0A    AssertJUnit.assertEquals(vals.length+1, cc.len());%0A    AssertJUnit.assertTrue(cc2 instanceof C1Chunk);%0A    for (int i=0;i%3Cvals.length;++i) AssertJUnit.assertEquals(vals%5Bi%5D, cc2.at80(i));%0A    AssertJUnit.assertTrue(cc2.isNA0(vals.length));%0A
 %0A   

Add test for C1Chunk.