public void Tokenizer_Recognize_Identifier() { IdentifierTable id = new IdentifierTable(); string code; bool expected; bool actual; code = "t123"; expected = true; actual = id.Find(code); Assert.AreEqual(expected, actual); id.Add(new Identifier("x1", 0, 0, 0)); code = "x1"; expected = true; actual = id.Find(code); Assert.AreEqual(expected, actual); code = "_text"; expected = true; actual = id.Find(code); Assert.AreEqual(expected, actual); code = "TEXT"; expected = true; actual = id.Find(code); Assert.AreEqual(expected, actual); code = "\"text\""; expected = false; actual = id.Find(code); Assert.AreEqual(expected, actual); code = "&text"; expected = false; actual = id.Find(code); Assert.AreEqual(expected, actual); code = "1text"; expected = false; actual = id.Find(code); Assert.AreEqual(expected, actual); code = "країна"; expected = true; actual = id.Find(code); Assert.AreEqual(expected, actual); IdentifierType exp; IdentifierType act; code = "SomeFunction() "; exp = IdentifierType.Function; act = id.IdentifyType(code); Assert.AreEqual(exp, act); code = "SomeArray[]"; exp = IdentifierType.Array; act = id.IdentifyType(code); Assert.AreEqual(exp, act); }