public void BitManipulationNextNumber3ArithmeticCompleteTestGetNext6NoSolution() { var original = Convert.ToInt32("01111111111111110000000000000000", 2); var actual = BitManipulationNextNumber3ArithmeticComplete.GetNext(original); Assert.AreEqual(-1, actual); }
public void BitManipulationNextNumber3ArithmeticCompleteTestGetPrev5AllClear() { var original = 0; var actual = BitManipulationNextNumber3ArithmeticComplete.GetPrev(original); Assert.AreEqual(-1, actual); }
public void BitManipulationNextNumber3ArithmeticCompleteTestGetPrev3AllSet() { var original = Convert.ToInt32("01111111111111111111111111111111", 2); var actual = BitManipulationNextNumber3ArithmeticComplete.GetPrev(original); Assert.AreEqual(-1, actual); }
public void BitManipulationNextNumber3ArithmeticCompleteTestGetPrev1Simple() { var original = Convert.ToInt32("10", 2); var expected = Convert.ToInt32("1", 2); var actual = BitManipulationNextNumber3ArithmeticComplete.GetPrev(original); Assert.AreEqual(expected, actual); }
public void BitManipulationNextNumber3ArithmeticCompleteTestGetNext4NegativeNumber() { try { BitManipulationNextNumber3ArithmeticComplete.GetNext(-1); } catch (ArgumentException) { Assert.IsTrue(true); return; } Assert.Fail(); }
public void BitManipulationNextNumber3ArithmeticCompleteTestGetNext5AllClear() { var actual = BitManipulationNextNumber3ArithmeticComplete.GetNext(0); Assert.AreEqual(-1, actual); }
public void BitManipulationNextNumber3ArithmeticCompleteTestGetPrev6NoSolution() { var actual = BitManipulationNextNumber3ArithmeticComplete.GetPrev(Convert.ToInt32("1111", 2)); Assert.AreEqual(-1, actual); }