Ejemplo n.º 1
0
        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 ());
        }
Ejemplo n.º 2
0
        public void CheckPrintAtom()
        {
            const string s = "zxcasd";
            var f = new CTLFormula (s);

            Assert.AreEqual ('{' + s + '}', f.ToString ());
        }
Ejemplo n.º 3
0
        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 ());
        }
Ejemplo n.º 4
0
 private static void Check(CTLFormula f)
 {
     Assert.AreEqual (f, CTLFormula.Parse (f.ToString ().Replace ('[', '(').Replace (']', ')')));
 }