@@ -0,0 +1,1736 @@
+package water.fvec;%0A%0Aimport org.testng.AssertJUnit;%0Aimport org.testng.annotations.Test;%0Aimport water.TestUtil;%0A%0Aimport java.util.Arrays;%0A%0Apublic class C4SChunkTest extends TestUtil %7B%0A  @Test void test_inflate_impl() %7B%0A    for (int l=0; l%3C1; ++l) %7B%0A      NewChunk nc = new NewChunk(null, 0);%0A%0A      // -2.147483647, 0, 0.0000215, 2.147583647, NA for l==0%0A      // NA, -2.147483647, 0, 0.0000215, 2.147583647, NA for l==1%0A      long%5B%5D man = new long%5B%5D%7B-2147483647, 0, 215, 188001238, 2147483647%7D;%0A      int%5B%5D exp = new int%5B%5D%7B-9, 1, -6, -8, -9%7D;%0A      if (l==1) nc.addNA(); //-2147483648%0A      for (int i = 0; i %3C man.length; ++i) nc.addNum(man%5Bi%5D, exp%5Bi%5D);%0A      nc.addNA();%0A%0A      Chunk cc = nc.compress();%0A      AssertJUnit.assertEquals(man.length + 1 + l, cc.len());%0A      AssertJUnit.assertTrue(cc instanceof C4SChunk);%0A      if (l==1) AssertJUnit.assertTrue(cc.isNA0(0));%0A      for (int i = 0; i %3C man.length; ++i)%0A        AssertJUnit.assertTrue(%22Expected: %22 + man%5Bi%5D * Math.pow(10, exp%5Bi%5D) + %22, but is %22 + cc.at0(l+i), Math.abs((man%5Bi%5D * Math.pow(10, exp%5Bi%5D)) - cc.at0(l+i)) %3C 1e-10);%0A      AssertJUnit.assertTrue(cc.isNA0(man.length + l));%0A%0A      Chunk cc2 = cc.inflate_impl(new NewChunk(null, 0)).compress();%0A      AssertJUnit.assertEquals(man.length + 1 + l, cc.len());%0A      if (l==1) AssertJUnit.assertTrue(cc2.isNA0(0));%0A      for (int i = 0; i %3C man.length; ++i)%0A        AssertJUnit.assertTrue(%22Expected: %22 + man%5Bi%5D * Math.pow(10, exp%5Bi%5D) + %22, but is %22 + cc2.at0(l+i), Math.abs((man%5Bi%5D * Math.pow(10, exp%5Bi%5D)) - cc2.at0(l+i)) %3C 1e-10);%0A      AssertJUnit.assertTrue(cc2.isNA0(man.length + l));%0A      AssertJUnit.assertTrue(cc2 instanceof C4SChunk);%0A%0A      AssertJUnit.assertTrue(Arrays.equals(cc._mem, cc2._mem));%0A    %7D%0A  %7D%0A%7D%0A

Add inflate_impl test for C4SChunk.