public void FindDefinitionsByNameDifferentCaseTest() { string text = "\"Start symbol\" = <start>"; var target = new GoldParsedDocument (); target.Parse (text); var enumerator = target.FindDefinitionsByName("\"START SYMBOL\"").GetEnumerator (); Assert.IsTrue (enumerator.MoveNext ()); }
public void FindDefinitionsByNameTest() { string text = "if='if'\r\n"+ "<expr>::=<expr>'+'<add>\r\n"+ "if = 'IF'"; var target = new GoldParsedDocument (); target.Parse (text); var enumerator = target.FindDefinitionsByName ("if").GetEnumerator (); var actualList = new List<DefinitionNode> (); while (enumerator.MoveNext()) { actualList.Add (enumerator.Current); } Assert.AreEqual (2, actualList.Count); Assert.AreEqual ("if", actualList [0].Name); Assert.AreEqual ("if", actualList [1].Name); }