public void Build620() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 7); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual <int>(1132936959, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual <int>(760089724, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual <int>(543216513, tree.Root.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNotNull(tree.Root.Left.Right); Assert.AreEqual <int>(987829501, tree.Root.Left.Right.Value); Assert.IsNull(tree.Root.Left.Right.Left); Assert.IsNull(tree.Root.Left.Right.Right); Assert.IsNotNull(tree.Root.Right); Assert.AreEqual <int>(1201531291, tree.Root.Right.Value); Assert.IsNull(tree.Root.Right.Left); Assert.IsNotNull(tree.Root.Right.Right); Assert.AreEqual <int>(1589837259, tree.Root.Right.Right.Value); Assert.IsNotNull(tree.Root.Right.Right.Left); Assert.AreEqual <int>(1503035547, tree.Root.Right.Right.Left.Value); Assert.IsNull(tree.Root.Right.Right.Left.Left); Assert.IsNull(tree.Root.Right.Right.Left.Right); Assert.IsNull(tree.Root.Right.Right.Right); Assert.AreEqual <int>(7, tree.Count); Assert.IsNotNull((object)s0); }
public Tree <int> Build([PexAssumeUnderTest] IntTreeBuilder target, int numNodes) { Tree <int> result = target.Build(numNodes); return(result); // TODO: add assertions to method IntTreeBuilderTest.Build(IntTreeBuilder, Int32) }
public void BuildThrowsArgumentOutOfRangeException513() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, int.MinValue); }
public void CreatesATreeOfExpectedSize() { var sut = new IntTreeBuilder(); var tree = sut.Build(5); Assert.AreEqual(5, tree.Count); }
public void Build593() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 15); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual <int>(1903464887, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual <int>(545899984, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual <int>(518630007, tree.Root.Left.Left.Value); Assert.IsNotNull(tree.Root.Left.Left.Left); Assert.AreEqual <int>(33904550, tree.Root.Left.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left.Left); Assert.IsNotNull(tree.Root.Left.Left.Left.Right); Assert.AreEqual <int>(180505380, tree.Root.Left.Left.Left.Right.Value); Assert.IsNull(tree.Root.Left.Left.Left.Right.Left); Assert.IsNull(tree.Root.Left.Left.Left.Right.Right); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNotNull(tree.Root.Left.Right); Assert.AreEqual <int>(1154814071, tree.Root.Left.Right.Value); Assert.IsNotNull(tree.Root.Left.Right.Left); Assert.AreEqual <int>(848489696, tree.Root.Left.Right.Left.Value); Assert.IsNotNull(tree.Root.Left.Right.Left.Left); Assert.AreEqual <int>(671175969, tree.Root.Left.Right.Left.Left.Value); Assert.IsNull(tree.Root.Left.Right.Left.Left.Left); Assert.IsNull(tree.Root.Left.Right.Left.Left.Right); Assert.IsNull(tree.Root.Left.Right.Left.Right); Assert.IsNotNull(tree.Root.Left.Right.Right); Assert.AreEqual <int>(1434608820, tree.Root.Left.Right.Right.Value); Assert.IsNull(tree.Root.Left.Right.Right.Left); Assert.IsNotNull(tree.Root.Left.Right.Right.Right); Assert.AreEqual <int>(1468375860, tree.Root.Left.Right.Right.Right.Value); Assert.IsNull(tree.Root.Left.Right.Right.Right.Left); Assert.IsNotNull(tree.Root.Left.Right.Right.Right.Right); Assert.AreEqual <int>(1551966185, tree.Root.Left.Right.Right.Right.Right.Value); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Left); Assert.IsNotNull(tree.Root.Left.Right.Right.Right.Right.Right); Assert.AreEqual <int> (1865760914, tree.Root.Left.Right.Right.Right.Right.Right.Value); Assert.IsNotNull(tree.Root.Left.Right.Right.Right.Right.Right.Left); Assert.AreEqual <int> (1713252086, tree.Root.Left.Right.Right.Right.Right.Right.Left.Value); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Right.Left.Left); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Right.Left.Right); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Right.Right); Assert.IsNotNull(tree.Root.Right); Assert.AreEqual <int>(2069938803, tree.Root.Right.Value); Assert.IsNotNull(tree.Root.Right.Left); Assert.AreEqual <int>(1915568235, tree.Root.Right.Left.Value); Assert.IsNull(tree.Root.Right.Left.Left); Assert.IsNull(tree.Root.Right.Left.Right); Assert.IsNull(tree.Root.Right.Right); Assert.AreEqual <int>(15, tree.Count); Assert.IsNotNull((object)s0); }
static void Main(string[] args) { var tree = new Tree<int>(); tree.Add(30).Add(25).Add(36).Add(12).Add(5); Console.WriteLine($"There are {tree.Count} elements in the tree"); ITreeBuilder<int> builder = new IntTreeBuilder(); var largeTree = builder.Build(1000000); Console.WriteLine($"There are {largeTree.Count} elements in the large tree"); }
public void Build175() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 0); Assert.IsNotNull((object)tree); Assert.IsNull(tree.Root); Assert.AreEqual<int>(0, tree.Count); Assert.IsNotNull((object)s0); }
public void Build175() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 0); Assert.IsNotNull((object)tree); Assert.IsNull(tree.Root); Assert.AreEqual <int>(0, tree.Count); Assert.IsNotNull((object)s0); }
public void Build96() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 1); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual <int>(1559183929, tree.Root.Value); Assert.IsNull(tree.Root.Left); Assert.IsNull(tree.Root.Right); Assert.AreEqual <int>(1, tree.Count); Assert.IsNotNull((object)s0); }
public void Build797() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 2); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual <int>(901052676, tree.Root.Value); Assert.IsNull(tree.Root.Left); Assert.IsNotNull(tree.Root.Right); Assert.AreEqual <int>(2100575205, tree.Root.Right.Value); Assert.IsNull(tree.Root.Right.Left); Assert.IsNull(tree.Root.Right.Right); Assert.AreEqual <int>(2, tree.Count); Assert.IsNotNull((object)s0); }
public void Build323() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 3); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual<int>(2090736641, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual<int>(1651053248, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual<int>(1076981962, tree.Root.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNull(tree.Root.Left.Right); Assert.IsNull(tree.Root.Right); Assert.AreEqual<int>(3, tree.Count); Assert.IsNotNull((object)s0); }
public void Build323() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 3); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual <int>(2090736641, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual <int>(1651053248, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual <int>(1076981962, tree.Root.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNull(tree.Root.Left.Right); Assert.IsNull(tree.Root.Right); Assert.AreEqual <int>(3, tree.Count); Assert.IsNotNull((object)s0); }
public void Build105() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 4); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual<int>(1776886346, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual<int>(1682429946, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual<int>(1132831053, tree.Root.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNotNull(tree.Root.Left.Right); Assert.AreEqual<int>(1743104312, tree.Root.Left.Right.Value); Assert.IsNull(tree.Root.Left.Right.Left); Assert.IsNull(tree.Root.Left.Right.Right); Assert.IsNull(tree.Root.Right); Assert.AreEqual<int>(4, tree.Count); Assert.IsNotNull((object)s0); }
public void Build105() { Tree <int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 4); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual <int>(1776886346, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual <int>(1682429946, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual <int>(1132831053, tree.Root.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNotNull(tree.Root.Left.Right); Assert.AreEqual <int>(1743104312, tree.Root.Left.Right.Value); Assert.IsNull(tree.Root.Left.Right.Left); Assert.IsNull(tree.Root.Left.Right.Right); Assert.IsNull(tree.Root.Right); Assert.AreEqual <int>(4, tree.Count); Assert.IsNotNull((object)s0); }
public void ThrowsForNegativeNumbers() { var sut = new IntTreeBuilder(); var tree = sut.Build(-1); }
public void Build620() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 7); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual<int>(1132936959, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual<int>(760089724, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual<int>(543216513, tree.Root.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNotNull(tree.Root.Left.Right); Assert.AreEqual<int>(987829501, tree.Root.Left.Right.Value); Assert.IsNull(tree.Root.Left.Right.Left); Assert.IsNull(tree.Root.Left.Right.Right); Assert.IsNotNull(tree.Root.Right); Assert.AreEqual<int>(1201531291, tree.Root.Right.Value); Assert.IsNull(tree.Root.Right.Left); Assert.IsNotNull(tree.Root.Right.Right); Assert.AreEqual<int>(1589837259, tree.Root.Right.Right.Value); Assert.IsNotNull(tree.Root.Right.Right.Left); Assert.AreEqual<int>(1503035547, tree.Root.Right.Right.Left.Value); Assert.IsNull(tree.Root.Right.Right.Left.Left); Assert.IsNull(tree.Root.Right.Right.Left.Right); Assert.IsNull(tree.Root.Right.Right.Right); Assert.AreEqual<int>(7, tree.Count); Assert.IsNotNull((object)s0); }
public void Build797() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 2); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual<int>(901052676, tree.Root.Value); Assert.IsNull(tree.Root.Left); Assert.IsNotNull(tree.Root.Right); Assert.AreEqual<int>(2100575205, tree.Root.Right.Value); Assert.IsNull(tree.Root.Right.Left); Assert.IsNull(tree.Root.Right.Right); Assert.AreEqual<int>(2, tree.Count); Assert.IsNotNull((object)s0); }
public void Build96() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 1); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual<int>(1559183929, tree.Root.Value); Assert.IsNull(tree.Root.Left); Assert.IsNull(tree.Root.Right); Assert.AreEqual<int>(1, tree.Count); Assert.IsNotNull((object)s0); }
public void BuildThrowsArgumentOutOfRangeException513() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, int.MinValue); }
public void Build593() { Tree<int> tree; IntTreeBuilder s0 = new IntTreeBuilder(); tree = this.Build(s0, 15); Assert.IsNotNull((object)tree); Assert.IsNotNull(tree.Root); Assert.AreEqual<int>(1903464887, tree.Root.Value); Assert.IsNotNull(tree.Root.Left); Assert.AreEqual<int>(545899984, tree.Root.Left.Value); Assert.IsNotNull(tree.Root.Left.Left); Assert.AreEqual<int>(518630007, tree.Root.Left.Left.Value); Assert.IsNotNull(tree.Root.Left.Left.Left); Assert.AreEqual<int>(33904550, tree.Root.Left.Left.Left.Value); Assert.IsNull(tree.Root.Left.Left.Left.Left); Assert.IsNotNull(tree.Root.Left.Left.Left.Right); Assert.AreEqual<int>(180505380, tree.Root.Left.Left.Left.Right.Value); Assert.IsNull(tree.Root.Left.Left.Left.Right.Left); Assert.IsNull(tree.Root.Left.Left.Left.Right.Right); Assert.IsNull(tree.Root.Left.Left.Right); Assert.IsNotNull(tree.Root.Left.Right); Assert.AreEqual<int>(1154814071, tree.Root.Left.Right.Value); Assert.IsNotNull(tree.Root.Left.Right.Left); Assert.AreEqual<int>(848489696, tree.Root.Left.Right.Left.Value); Assert.IsNotNull(tree.Root.Left.Right.Left.Left); Assert.AreEqual<int>(671175969, tree.Root.Left.Right.Left.Left.Value); Assert.IsNull(tree.Root.Left.Right.Left.Left.Left); Assert.IsNull(tree.Root.Left.Right.Left.Left.Right); Assert.IsNull(tree.Root.Left.Right.Left.Right); Assert.IsNotNull(tree.Root.Left.Right.Right); Assert.AreEqual<int>(1434608820, tree.Root.Left.Right.Right.Value); Assert.IsNull(tree.Root.Left.Right.Right.Left); Assert.IsNotNull(tree.Root.Left.Right.Right.Right); Assert.AreEqual<int>(1468375860, tree.Root.Left.Right.Right.Right.Value); Assert.IsNull(tree.Root.Left.Right.Right.Right.Left); Assert.IsNotNull(tree.Root.Left.Right.Right.Right.Right); Assert.AreEqual<int>(1551966185, tree.Root.Left.Right.Right.Right.Right.Value); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Left); Assert.IsNotNull(tree.Root.Left.Right.Right.Right.Right.Right); Assert.AreEqual<int> (1865760914, tree.Root.Left.Right.Right.Right.Right.Right.Value); Assert.IsNotNull(tree.Root.Left.Right.Right.Right.Right.Right.Left); Assert.AreEqual<int> (1713252086, tree.Root.Left.Right.Right.Right.Right.Right.Left.Value); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Right.Left.Left); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Right.Left.Right); Assert.IsNull(tree.Root.Left.Right.Right.Right.Right.Right.Right); Assert.IsNotNull(tree.Root.Right); Assert.AreEqual<int>(2069938803, tree.Root.Right.Value); Assert.IsNotNull(tree.Root.Right.Left); Assert.AreEqual<int>(1915568235, tree.Root.Right.Left.Value); Assert.IsNull(tree.Root.Right.Left.Left); Assert.IsNull(tree.Root.Right.Left.Right); Assert.IsNull(tree.Root.Right.Right); Assert.AreEqual<int>(15, tree.Count); Assert.IsNotNull((object)s0); }