public void SolveTest8() { int[] arr = new[] { 0, 1, 1, 0, 0, 0, 0, 1, 0, 1 }; ArrayModifer modifer = new ArrayModifer(); for (int i = 1; i <= 100; i++) { if (i % 10 == 0) { arr = modifer.ArrayModify((ArrayAction)(i / 10), arr); } var simuator = new FullQ4Simulator(arr, new CacheRandomMemoryChanger(), 1); ESAbATAd sol = new ESAbATAd(simuator); var res = sol.Solve(); var expected = new string(simuator.MemoryArray.Select(x => (char)(x + '0')).ToArray()); var actual = new string(sol.MemoryFinder.MemoryArr.Select(x => (char)(x + '0')).ToArray()); try { Assert.AreEqual("Y", res); } catch (Exception) { throw; } } }
public void SolveTest7() { int[] arr = new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, }; var simuator = new FullQ4Simulator(arr, new TestMemoryChanger(), 1); ESAbATAd sol = new ESAbATAd(simuator); var res = sol.Solve(); }