private void PrepareLabTests(Lab07 solver) { TestSets["ElementsInDistance"] = new TestSet(solver, "Part 1 - CanPlaceElementsInDistance"); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Równoodległe 1", new int[] { 1, 2, 3 }, 3, 1, true)); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Równoodległe 2", new int[] { 0, 2, 4, 6, 8, 10 }, 2, 4, true)); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Równoodległe z przerwą", new int[] { 4, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20 }, 5, 5, false)); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Powtórzenie", new int[] { 2, 2, 5, 6, 7, 8, 9, 10 }, 6, 4, false)); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Wiele powtórzeń jednej pozycji", new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, 3, 0, true)); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Mały test, niepowodzenie", new int[] { 1, 2, 4, 8, 9 }, 4, 10, false)); TestSets["ElementsInDistance"].TestCases.Add(new CanPlaceElementsInDistanceTestCase(1, null, "Mały test, powodzenie", new int[] { 0, 5, 6, 7, 8, 10 }, 3, 5, true)); TestSets["LargestMinDistance"] = new TestSet(solver, "Part 2 - LargestMinDistance"); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Równoodległe 1", new int[] { 1, 2, 3 }, 3, 1)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Równoodległe 2", new int[] { 0, 2, 4, 6, 8, 10 }, 3, 4)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Równoodległe z przerwą", new int[] { 4, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20 }, 3, 5)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Powtórzenie", new int[] { 2, 2, 5, 6, 7, 8, 9, 10 }, 3, 4)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Wiele powtórzeń jednej pozycji", new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, 3, 0)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Mały test 1", new int[] { 1, 2, 4, 8, 9 }, 3, 3)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Mały test 2", new int[] { 0, 5, 6, 7, 8, 10 }, 3, 5)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, new ArgumentException(), "Zbyt mało pozycji 1", new int[] { 2 }, 2, 0)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, new ArgumentException(), "Zbyt mało pozycji 2", new int[] { 5, 21, 44, 45 }, 5, 0)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, new ArgumentException(), "Zbyt mało obiektów", new int[] { 5, 21, 44, 45 }, 1, 0)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Powtórzenie, wszystkie zajęte", new int[] { 2, 2 }, 2, 0)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Odległa pozycja", new int[] { 2, 4, 5, 7, 9, 11, 20, 200 }, 6, 2)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Równoodległe 3", new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }, 5, 6)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Wiele powtórzeń różnych pozycji", new int[] { 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 }, 6, 1)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Średni test 1", new int[] { 4, 5, 6, 7, 8, 11, 20, 21, 22, 33, 44, 45, 46, 99 }, 2, 95)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Średni test 2", new int[] { 4, 5, 6, 7, 8, 11, 20, 21, 22, 33, 44, 45, 46, 99 }, 4, 18)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Średni test 3", new int[] { 4, 5, 6, 7, 8, 11, 20, 21, 22, 33, 44, 45, 46, 99 }, 5, 13)); TestSets["LargestMinDistance"].TestCases.Add(new LargestMinDistanceTestCase(1, null, "Średni test 4", new int[] { 1, 2, 4, 5, 7, 8, 10, 43, 76, 99 }, 4, 23)); }
public override void PrepareTestSets() { Lab07 solver = new Lab07(); PrepareLabTests(solver); }