Пример #1
0
 static void CounTreeTest(string s)
 {
     CountTree tree = new CountTree(s);
     tree.Print();
     Console.WriteLine();
     Console.WriteLine(tree.Count());
     Console.WriteLine("***************");
 }
Пример #2
0
        static void CounTreeTest(string s)
        {
            CountTree tree = new CountTree(s);

            tree.Print();
            Console.WriteLine();
            Console.WriteLine(tree.Count());
            Console.WriteLine("***************");
        }
Пример #3
0
 static void Main(string[] args)
 {
     CounTreeTest("../../example_0.txt");
     CounTreeTest("../../example_2.txt");
     CounTreeTest("../../example_3.txt");
     CounTreeTest("../../example_4.txt");
     CounTreeTest("../../example_6.txt");
     CountTree tree = new CountTree("../../example_4.txt");
     tree.Root().Left.Print();
     Console.WriteLine();
     Console.WriteLine(tree.Root().Left.Action());
     Console.ReadKey();
 }
Пример #4
0
        static void Main(string[] args)
        {
            CounTreeTest("../../example_0.txt");
            CounTreeTest("../../example_2.txt");
            CounTreeTest("../../example_3.txt");
            CounTreeTest("../../example_4.txt");
            CounTreeTest("../../example_6.txt");
            CountTree tree = new CountTree("../../example_4.txt");

            tree.Root().Left.Print();
            Console.WriteLine();
            Console.WriteLine(tree.Root().Left.Action());
            Console.ReadKey();
        }
Пример #5
0
 public void Test_6()
 {
     tree = new CountTree("../../example_6.txt");
     Assert.AreEqual(tree.Count(), 6);
 }
Пример #6
0
 public void TestSubtractAndMultiply()
 {
     tree = new CountTree("../../example_0.txt");
     Assert.AreEqual(tree.Count(), 0);
 }
Пример #7
0
 public void TestSimpleAdd()
 {
     tree = new CountTree("../../example_2.txt");
     Assert.AreEqual(tree.Count(), 2);
 }
Пример #8
0
 public void TestLeftNode()
 {
     tree = new CountTree("../../example_3.txt");
     Assert.AreEqual(tree.Root().Left.Action(), 9);
 }
Пример #9
0
 public void TestDivide()
 {
     tree = new CountTree("../../example_3.txt");
     Assert.AreEqual(tree.Count(), 3);
 }