public virtual void TestDelta() { byte[] encoded = ArrayUtils.DeltaEncode(sampleGaps); int[] decoded = ArrayUtils.DeltaDecode(encoded); NUnit.Framework.Assert.IsTrue(ArrayUtils.EqualContents(decoded, sampleGaps)); try { ArrayUtils.DeltaEncode(sampleBadGaps); throw new Exception("Expected an IllegalArgumentException"); } catch (ArgumentException) { } }
public virtual void TestEqualContentsInt() { NUnit.Framework.Assert.IsTrue(ArrayUtils.EqualContents(sampleGaps, sampleGaps)); NUnit.Framework.Assert.IsTrue(ArrayUtils.EqualContents(sampleBadGaps, sampleBadGaps)); NUnit.Framework.Assert.IsFalse(ArrayUtils.EqualContents(sampleGaps, sampleBadGaps)); }