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); }
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); }
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); }