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