public void TestMarkScheme() { Assert.AreEqual("11011", NewOrder.NthWithMOnes(3, 4)); Assert.AreEqual("0", NewOrder.NthWithMOnes(1, 0)); Assert.AreEqual("100000 000000 000000 00", NewOrder.NthWithMOnes(20, 1)); Assert.AreEqual("111111 111111 111111 111111", NewOrder.NthWithMOnes(1, 24)); Assert.AreEqual("11001", NewOrder.NthWithMOnes(8, 3)); Assert.AreEqual("100111 001000 0", NewOrder.NthWithMOnes(1000, 5)); Assert.AreEqual("110010 101011 010010 00010", NewOrder.NthWithMOnes(1000000, 10)); Assert.AreEqual("100100 000101 100010 100000 100000", NewOrder.NthWithMOnes(5000000, 8)); Assert.AreEqual("111111 111111 111000 000000 00000", NewOrder.NthWithMOnes(77558760, 15)); }
public void TestNthWithMOnes() { Assert.AreEqual("1000", NewOrder.NthWithMOnes(4, 1)); Assert.AreEqual("11011", NewOrder.NthWithMOnes(3, 4)); }