public void SwapOddEvenBits(string xB, string expected) { var x = Convert.ToInt32(xB, 2); var xp = SwapBits.SwapOddEvenBits(x); var actual = Convert.ToString(xp, 2); Assert.Equal(expected, actual); }
public void DigitalRoot() { var answer = SwapBits.topNCompetitors(5, 2, new List <string> { "anacell", "betacell", "deltacellular", "eruocell", "centracular" }, 5, new List <string> { "I love anacell Best services provided by anacell in the town", "betacell has great services", "deltacellular provides much better services than betacell", "betacell is better than than deltacellular" }); }
public void SwapBitsTest() { var answer = SwapBits.SwapBitsByPosition(5, 1, 2); }
public void TestRemoveLastBit() { SwapBits.TestREmoveLastBit(5); }
public void SwapBits_Smoke_Test() { Assert.AreEqual(227, SwapBits.Swap(47, 1, 5, 3)); Assert.AreEqual(7, SwapBits.Swap(28, 0, 3, 2)); }