public void GetIndex() { Assert.AreEqual(0, _array.GetIndex(0, 0)); Assert.AreEqual(1, _array.GetIndex(0, 1)); Assert.AreEqual(3, _array.GetIndex(1, 0)); Assert.AreEqual(5, _array.GetIndex(1, 2)); }
public void GetIndexArray() { StringArray array = new StringArray(2, 3, 4); Assert.AreEqual(0, array.GetIndex(new int[] { 0, 0, 0 })); Assert.AreEqual(1, array.GetIndex(new int[] { 0, 0, 1 })); Assert.AreEqual(4, array.GetIndex(new int[] { 0, 1, 0 })); Assert.AreEqual(8, array.GetIndex(new int[] { 0, 2, 0 })); Assert.AreEqual(12, array.GetIndex(new int[] { 1, 0, 0 })); Assert.AreEqual(23, array.GetIndex(new int[] { 1, 2, 3 })); }
public void GetIndex3D() { StringArray array = new StringArray(2, 3, 4); Assert.AreEqual(0, array.GetIndex(0, 0, 0)); Assert.AreEqual(1, array.GetIndex(0, 0, 1)); Assert.AreEqual(4, array.GetIndex(0, 1, 0)); Assert.AreEqual(8, array.GetIndex(0, 2, 0)); Assert.AreEqual(12, array.GetIndex(1, 0, 0)); Assert.AreEqual(23, array.GetIndex(1, 2, 3)); }