def test_specified(self): a = pyrtl.Output() b = pyrtl.Output() self.assertIs(simulators._get_output(b, self.block), b)
def test_autogen(self): a = pyrtl.Output() self.assertIs(simulators._get_output(None, self.block), a)
def test_invalid_specification(self): with self.assertRaises(pyrtl.PyrtlError): simulators._get_output(1, self.block)
def test_no_outputs(self): with self.assertRaises(pyrtl.PyrtlError): simulators._get_output(None, self.block)
def test_too_many_outputs(self): a = pyrtl.Output() b = pyrtl.Output() with self.assertRaises(pyrtl.PyrtlError): simulators._get_output(None, self.block)