public virtual void TestParseFive() { LeafBucket b = new LeafBucket(0); b.ParseOneEntry(Id(unchecked ((int)(0x11))), Id(unchecked ((int)(0x81)))); b.ParseOneEntry(Id(unchecked ((int)(0x22))), Id(unchecked ((int)(0x82)))); b.ParseOneEntry(Id(unchecked ((int)(0x33))), Id(unchecked ((int)(0x83)))); b.ParseOneEntry(Id(unchecked ((int)(0x44))), Id(unchecked ((int)(0x84)))); b.ParseOneEntry(Id(unchecked ((int)(0x55))), Id(unchecked ((int)(0x85)))); NUnit.Framework.Assert.IsNull(b.GetNote(Id(unchecked ((int)(0x01))), null)); NUnit.Framework.Assert.AreEqual(Id(unchecked ((int)(0x81))), b.GetNote(Id(unchecked ( (int)(0x11))), null).GetData()); NUnit.Framework.Assert.AreEqual(Id(unchecked ((int)(0x82))), b.GetNote(Id(unchecked ( (int)(0x22))), null).GetData()); NUnit.Framework.Assert.AreEqual(Id(unchecked ((int)(0x83))), b.GetNote(Id(unchecked ( (int)(0x33))), null).GetData()); NUnit.Framework.Assert.AreEqual(Id(unchecked ((int)(0x84))), b.GetNote(Id(unchecked ( (int)(0x44))), null).GetData()); NUnit.Framework.Assert.AreEqual(Id(unchecked ((int)(0x85))), b.GetNote(Id(unchecked ( (int)(0x55))), null).GetData()); NUnit.Framework.Assert.IsNull(b.GetNote(Id(unchecked ((int)(0x66))), null)); }
private LeafBucket ParseLeafTree() { LeafBucket leaf = new LeafBucket(prefixLen); MutableObjectId idBuf = new MutableObjectId(); for (; !Eof; Next(1)) { if (ParseObjectId(idBuf)) { leaf.ParseOneEntry(idBuf, EntryObjectId); } else { StoreNonNote(); } } return(leaf); }