diff --git a/test/test_core/test_breakpoint.py b/test/test_core/test_breakpoint.py index ec961f4ee887db8e5ad28f493c41b38b2e16ca74..e2e600c6f039db5560fcf3dd4de33dac65372ce2 100644 --- a/test/test_core/test_breakpoint.py +++ b/test/test_core/test_breakpoint.py @@ -201,14 +201,14 @@ def test_add_remove_memory_breakpoint(): mem = Memory(in_s, out_s, ctrl_s, adr_s, 8) cpu.add_module(mem) - assert len(cpu.breakpoints) == 0 - assert cpu.breakpoint_id_counter == 1 + assert len(cpu._breakpoints) == 0 + assert cpu._breakpoint_id_counter == 1 cpu.add_memory_breakpoint("Memory", 1, 1) - assert cpu.breakpoint_id_counter == 2 - assert len(cpu.breakpoints) == 1 + assert cpu._breakpoint_id_counter == 2 + assert len(cpu._breakpoints) == 1 assert cpu.remove_breakpoint(1) == True - assert cpu.breakpoints == {} - assert len(cpu.breakpoints) == 0 + assert cpu._breakpoints == {} + assert len(cpu._breakpoints) == 0 def test_stop_on_memory_breakpoint(): @@ -223,7 +223,7 @@ def test_stop_on_memory_breakpoint(): mem = Memory(in_s, out_s, ctrl_s, adr_s, 8) cpu.add_module(mem) assert mem._memory == [0 for _ in range(8)] - assert cpu.clock == 0 + assert cpu._clock == 0 in_s.update_value(1) ctrl_s.update_value(True) @@ -235,7 +235,7 @@ def test_stop_on_memory_breakpoint(): cpu.run_continuously() assert mem._memory == [0, 0, 1, 0, 0, 0, 0, 0] assert cpu.is_stopped == True - assert cpu.clock == 2 + assert cpu._clock == 2 mem._memory = [0 for _ in range(8)] in_s.update_value(1) @@ -257,14 +257,14 @@ def test_add_remove_state_breakpoint(): lc = LC(s, s, s, s) cpu.add_module(lc) - assert len(cpu.breakpoints) == 0 - assert cpu.breakpoint_id_counter == 1 + assert len(cpu._breakpoints) == 0 + assert cpu._breakpoint_id_counter == 1 cpu.add_state_breakpoint("LC", "value", 1) - assert len(cpu.breakpoints) == 1 - assert cpu.breakpoint_id_counter == 2 + assert len(cpu._breakpoints) == 1 + assert cpu._breakpoint_id_counter == 2 assert cpu.remove_breakpoint(1) == True - assert cpu.breakpoints == {} - assert len(cpu.breakpoints) == 0 + assert cpu._breakpoints == {} + assert len(cpu._breakpoints) == 0 def test_stop_on_state_breakpoint(): diff --git a/test/test_core/test_reset.py b/test/test_core/test_reset.py index 6d84136c19bafa0f5bd8e314329dd2b7e293f880..bec0a7312bed9912a65b0bf9dabd3cf1cb5990d3 100644 --- a/test/test_core/test_reset.py +++ b/test/test_core/test_reset.py @@ -35,22 +35,22 @@ class DummyModule(Module): def test_reset(): cpu = Processor() - cpu.signal_history = ["this", "should", "be", "removed"] + cpu._signal_history = ["this", "should", "be", "removed"] dummy = DummyModule() - cpu.clock = 100 - cpu.removed_cycles = 1337 - cpu.module_history.append(dummy.get_state()) - cpu.signal_history.clear() - cpu.removed_cycles = 0 - cpu.assembly_cycles = [i for i in range(9)] + cpu._clock = 100 + cpu._removed_cycles = 1337 + cpu._module_history.append(dummy.get_state()) + cpu._signal_history.clear() + cpu._removed_cycles = 0 + cpu._assembly_cycles = [i for i in range(9)] cpu.add_module(dummy) cpu.reset() assert dummy.name == "dummy" assert dummy.a == 0 assert dummy.b == "" assert dummy.c == [] - assert cpu.clock == 0 - assert cpu.removed_cycles == 0 - assert cpu.module_history == [] - assert cpu.signal_history == [] - assert cpu.assembly_cycles == [0] + assert cpu._clock == 0 + assert cpu._removed_cycles == 0 + assert cpu._module_history == [] + assert cpu._signal_history == [] + assert cpu._assembly_cycles == [0]