public void BitManipulationNextNumber1BruteForceCompleteTestGetPrev5AllClear() { var original = 0; var actual = BitManipulationNextNumber1BruteForceComplete.GetPrev(original); Assert.AreEqual(-1, actual); }
public void BitManipulationNextNumber1BruteForceCompleteTestGetPrev3AllSet() { var original = Convert.ToInt32("01111111111111111111111111111111", 2); var actual = BitManipulationNextNumber1BruteForceComplete.GetPrev(original); Assert.AreEqual(-1, actual); }
public void BitManipulationNextNumber1BruteForceCompleteTestGetPrev1Simple() { var original = Convert.ToInt32("10", 2); var expected = Convert.ToInt32("1", 2); var actual = BitManipulationNextNumber1BruteForceComplete.GetPrev(original); Assert.AreEqual(expected, actual); }
public void BitManipulationNextNumber1BruteForceCompleteTestGetPrev4NegativeNumber() { try { BitManipulationNextNumber1BruteForceComplete.GetPrev(-1); } catch (ArgumentException) { Assert.IsTrue(true); return; } Assert.Fail(); }
public void BitManipulationNextNumber1BruteForceCompleteTestGetPrev6NoSolution() { var actual = BitManipulationNextNumber1BruteForceComplete.GetPrev(Convert.ToInt32("1111", 2)); Assert.AreEqual(-1, actual); }