Exemplo n.º 1
0
        public void expTest()
        {
            KarnoughEngine en = new KarnoughEngine();

            en.script     = @"..\..\..\Karnaugh-Logic\pycode\jsontest.py";
            en.python_env = python;
            IKarnoughMap map = en.solve("x+a");

            maptest(map);
        }
Exemplo n.º 2
0
        public void generateTest()
        {
            KarnoughEngine en = new KarnoughEngine();

            en.script     = @"..\..\..\Karnaugh-Logic\pycode\jsontest.py";
            en.python_env = python;
            IKarnoughMap map = en.solve("x+a");
            string       exp = en.getExpress(map);

            Assert.AreEqual("not(value1)", exp);
        }
Exemplo n.º 3
0
        public void jsontest()
        {
            //KarnoughEngine en = new KarnoughEngine();
            string jsonpath = @"../../../TestJson.json";
            string json;

            using (FileStream fs = File.OpenRead(jsonpath))
            {
                using (StreamReader sr = new StreamReader(fs)){
                    json = sr.ReadToEnd();
                }
            }

            IKarnoughMap map = KarnoughEngine.deserializer(json);

            maptest(map);
        }