refactor: clean up test suite and apply code formatting

Remove redundant/obsolete tests from intel_400x_tests.rs, retaining core test coverage for Intel400x common functionality. Apply rustfmt formatting to intel_4002.rs and state machine test files.

Changes:

- Remove ~40 redundant test functions from intel_400x_tests.rs

- Apply rustfmt formatting to intel_4002.rs

- Fix import formatting in state machine tests

- Clean up trailing whitespace
This commit is contained in:
Jan-Peter von Hunnius 2026-02-26 14:32:52 +01:00
parent c9f39aa600
commit 3530ea5f28
4 changed files with 62 additions and 5898 deletions

View file

@ -435,7 +435,8 @@ impl Intel4002 {
if let Ok(pin) = self.base.get_pin(&format!("D{}", i)) {
if let Ok(mut pin_guard) = pin.lock() {
// Use the same driver name as write_data_bus() to properly tri-state
pin_guard.set_driver(Some(format!("{}_DATA", self.base.name())), PinValue::HighZ);
pin_guard
.set_driver(Some(format!("{}_DATA", self.base.name())), PinValue::HighZ);
}
}
}
@ -621,7 +622,7 @@ impl Intel4002 {
if self.state_machine.is_full_address_ready() {
let address = self.state_machine.get_full_address().unwrap_or(0) as u8;
let data = self.read_data_bus();
// Determine which output port based on address
// Output ports are at addresses 0x14-0x17 (port 0-3)
let port = match address {
@ -631,7 +632,7 @@ impl Intel4002 {
0x17 => Some(3),
_ => None,
};
if let Some(port_num) = port {
// Write to I/O port
let _ = self.write_io_port(port_num, data);