def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_all_regs() ecb_fields = ["EBW015", "EBW016", "EBW010", "EBW011", "EBW012", "EBW013", ("EBW020", 4), ("EBW024", 4)] self.test_data.add_fields(ecb_fields, "EB0EB") self.test_data.output.debug = ["TS16"]
def run_test_data(test_data_id: str, **kwargs) -> Response: test_data: TestData = kwargs[test_data_id] if test_data.seg_name not in segments: return error_response(400, 'Error in segment name') tpf_server = TpfServer() test_data = tpf_server.run(test_data.seg_name, test_data) return jsonify(test_data.cascade_to_dict())
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_fields([('EBW000', 3), 'EBW003', ('EBW004', 4), ('EBW008', 8), 'EBW020', ('EBW028', 4), ('EBW032', 4), ('EBW036', 4), ('EBW040', 4), ('EBW044', 4), ('EBW024', 4), ('EBW048', 3), ('EBW051', 7), 'EBW058'], 'EB0EB')
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() ecb_fields = [('EBW000', 4), ('EBW004', 2), ('EBW008', 12), ('EBW020', 12), ('EBW032', 6), ('EBW040', 8), ('EBW048', 8), ('EBW056', 8), ('EBW064', 6), ('EBT000', 4)] self.test_data.add_fields(ecb_fields, 'EB0EB') self.test_data.add_all_regs()
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_all_regs() aaa_fields = [("WA0BBR", 2), ("WA0QHR", 6), "WA0TKK", "WA0TY1"] self.test_data.add_fields(aaa_fields, "WA0AA") ecb_fields = [("EBW001", 6), ("EBW008", 6), "EBW000", "EBW016", "EBW017", "EBW018", ("EBX000", 4), ("EBX004", 4), ("EBX008", 4), ("EBX012", 4), ("EBX016", 4)] self.test_data.add_fields(ecb_fields, "EB0EB")
def test_segment(self): self.maxDiff = None seg: Segment = segments[self.SEG_NAME] lines = Line.from_file(File.open(segments[self.SEG_NAME].file_name)) instructions = [ line.command for line in lines if line.command not in macros ] unknown_in_assembly = { command for command in instructions if command not in seg.all_commands } self.assertSetEqual(set(), unknown_in_assembly, "\nUnknown in assembly.") seg.assemble() unknown_in_execute = { node.command for _, node in seg.nodes.items() if node.command not in TpfServer()._ex } self.assertSetEqual(set(), unknown_in_execute, "\nUnknown in execute.")
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_all_reg_pointers(2) self.test_data.add_all_regs() self.test_data.add_fields(['EBT000', 'EBW000', ('EBX000', 4)], 'EB0EB')
def setUpClass(cls) -> None: cls.tpf_server = TpfServer()
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_fields(['EBW000'], 'EB0EB') self.test_data.add_all_regs()
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_fields([('EBW000', 28), 'CE1$UID'], 'EB0EB') self.test_data.add_fields(['@HAALC'], 'GLOBAL') self.test_data.add_all_regs()
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_fields([('EBX000', 3), ('EBX003', 5), ('EBX008', 3)], 'EB0EB') self.test_data.output.regs['R0'] = 0
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.add_all_regs()
def setUp(self) -> None: self.tpf_server = TpfServer() self.test_data = TestDataUTS() self.test_data.output.debug = self.SEGMENTS if config.TEST_DEBUG else list( ) self.output = None