Skip to content

Commit

Permalink
More tests for FIFO size
Browse files Browse the repository at this point in the history
  • Loading branch information
vncoelho authored Jul 9, 2019
1 parent aa7d602 commit 5547a8e
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion neo.UnitTests/UT_FifoSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ public void FifoSetTest()
Assert.IsTrue(set.Add(c));

CollectionAssert.AreEqual(set.ToArray(), new UInt256[] { a, c });

var d = new UInt256(new byte[32] {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x02
});

Assert.IsTrue(set.Add(d));
CollectionAssert.AreEqual(set.ToArray(), new UInt256[] { a, b, d });

var e = new UInt256(new byte[32] {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x03
});

Assert.IsTrue(set.Add(e));
CollectionAssert.AreEqual(set.ToArray(), new UInt256[] { b, d, e });
}
}
}
}

0 comments on commit 5547a8e

Please sign in to comment.