public void LoaderLabelTableTryResolveOnUndefinedLabelReturnsFalse() { var labels = new LoaderLabelTable(); ushort value; Assert.IsFalse(labels.TryResolve("NonExistentLabel", out value)); Assert.AreEqual(0x0000, value); }
public void CantPopLastLabelTableScope() { var labels = new LoaderLabelTable(); Assert.AreEqual(0, labels.CurrentScope); labels.Pop(); Assert.AreEqual(0, labels.CurrentScope); }
public void LoaderLabelTableResolveOnUndefinedLabelFails() { var labels = new LoaderLabelTable(); try { var value = labels.Resolve("NonExistentLabel"); } catch (KeyNotFoundException) { Assert.Pass(); } Assert.Fail(); }