예제 #1
0
 public void OneAndZeroTest()
 {
     int[] A = new int[] { 1, 0, 1, 0 };
     Assert.AreEqual(5, NumberOfDisc.Solution(A));
 }
예제 #2
0
 public void OverflowTestTest()
 {
     int[] A = Enumerable.Repeat(int.MaxValue, 100000).ToArray();
     Assert.AreEqual(-1, NumberOfDisc.Solution(A));
 }
예제 #3
0
 public void EnumeratorTest()
 {
     int[] A = new int[] { 0, 1, 2, 3, 4 };
     Assert.AreEqual(10, NumberOfDisc.Solution(A));
 }
예제 #4
0
 public void AllOneTest()
 {
     int[] A = new int[] { 1, 1, 1, 1, 1 };
     Assert.AreEqual(4, NumberOfDisc.Solution(A));
 }
예제 #5
0
 public void AllZeroTest()
 {
     int[] A = new int[5];
     Assert.AreEqual(0, NumberOfDisc.Solution(A));
 }
예제 #6
0
 public void ExampleTest()
 {
     Assert.AreEqual(11, NumberOfDisc.Solution(new int[] { 11, 5, 2, 1, 4, 0 }));
 }