예제 #1
0
        public void EmptyString()
        {
            List <string> perms = HeapAlgorithm.GetPerms(string.Empty);

            Assert.AreEqual(1, perms.Count);
            Assert.AreEqual(string.Empty, perms[0]);
        }
예제 #2
0
        public void StringLengthThree()
        {
            string        s     = "abc";
            List <string> perms = HeapAlgorithm.GetPerms(s);

            Assert.AreEqual(6, perms.Count);
            //Assert.AreEqual(singleton, perms[0]);
        }
예제 #3
0
        public void SingletonString()
        {
            string        singleton = "a";
            List <string> perms     = HeapAlgorithm.GetPerms(singleton);

            Assert.AreEqual(1, perms.Count);
            Assert.AreEqual(singleton, perms[0]);
        }
예제 #4
0
 public void NullString()
 {
     Assert.IsNull(HeapAlgorithm.GetPerms(null));
 }