public void CheckPrintOr() { const string s1 = "qwe"; const string s2 = "asd"; var f = new CTLFormula (s1) | new CTLFormula (s2); Assert.AreEqual ("({" + s1 + "}) or ({" + s2 + "})", f.ToString ()); }
public void CheckPrintAtom() { const string s = "zxcasd"; var f = new CTLFormula (s); Assert.AreEqual ('{' + s + '}', f.ToString ()); }
public void CheckPrintComplexFormula() { const string s1 = "qwe"; const string s2 = "asd"; const string s3 = "zxc"; var f1 = (new CTLFormula (s1) & new CTLFormula (s2)) | new CTLFormula (s3); var f2 = new CTLFormula (s1) & (new CTLFormula (s2) | new CTLFormula (s3)); Assert.AreEqual ("(({" + s1 + "}) and ({" + s2 + "})) or ({" + s3 + "})", f1.ToString ()); Assert.AreEqual ("({" + s1 + "}) and (({" + s2 + "}) or ({" + s3 + "}))", f2.ToString ()); }
private static void Check(CTLFormula f) { Assert.AreEqual (f, CTLFormula.Parse (f.ToString ().Replace ('[', '(').Replace (']', ')'))); }