コード例 #1
0
 def testSolutionDisloc(self):
     mdsl = evaluate.parseMDSL(self.mdslIn.splitlines())
     sol1 = """1 solutions found
 C1.RDC1.Connector1 = { Iface1,Iface2, }
 C1.RDC1.Connector2 = {  }
 C1.RDC1.Connector3 = { Iface3, }
 """
     self.assertTrue(evaluate.checkSolution(mdsl, sol1.splitlines()))
     sol2 = """1 solutions found
 C1.RDC1.Connector3 = { Iface1,Iface2,Iface3, }
 """
     self.assertFalse(evaluate.checkSolution(mdsl, sol2.splitlines()))
コード例 #2
0
 def testParse(self):
     mdsl = evaluate.parseMDSL(self.mdslIn.splitlines())
     self.assertEqual(len(mdsl.hardware), 1)