static void CounTreeTest(string s) { CountTree tree = new CountTree(s); tree.Print(); Console.WriteLine(); Console.WriteLine(tree.Count()); Console.WriteLine("***************"); }
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(); }
public void Test_6() { tree = new CountTree("../../example_6.txt"); Assert.AreEqual(tree.Count(), 6); }
public void TestSubtractAndMultiply() { tree = new CountTree("../../example_0.txt"); Assert.AreEqual(tree.Count(), 0); }
public void TestSimpleAdd() { tree = new CountTree("../../example_2.txt"); Assert.AreEqual(tree.Count(), 2); }
public void TestLeftNode() { tree = new CountTree("../../example_3.txt"); Assert.AreEqual(tree.Root().Left.Action(), 9); }
public void TestDivide() { tree = new CountTree("../../example_3.txt"); Assert.AreEqual(tree.Count(), 3); }