public void ItNormalizesLocalPagePosition() { var pd = new CharacterPageDirectory(80, 60); pd[4801] = new Character(new Text(null, null), 0, 0xFF, null, CharacterFlags.None); Assert.AreEqual(2, pd.PageCount); Assert.AreEqual(0, pd.Get(1)[0, 59].Char); Assert.AreEqual(0xFF, pd.Get(1)[1].Char); }
public void ItNormalizesLocalPageCoordinates() { var pd = new CharacterPageDirectory(10, 1); pd[5, 6] = new Character(new Text(null, null), 0, 0xFF, null, CharacterFlags.None); Assert.AreEqual(7, pd.PageCount); Assert.AreEqual(0, pd.Get(6)[4, 0].Char); Assert.AreEqual(0xFF, pd.Get(6)[5, 0].Char); }
public void PageCoordinatesAndPositionsMatch() { var pd = new CharacterPageDirectory(80, 60); pd[0, 60] = new Character(new Text(null, null), 0, 0xFF, null, CharacterFlags.None); Assert.AreEqual(2, pd.GetOrCreatePage(60 * 80).PageNumber); Assert.AreEqual(0xFF, pd.Get(1)[0].Char); Assert.AreEqual(0xFF, pd[60 * 80].Char); }