mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Here's an instantly failing test...
This commit is contained in:
parent
da6fe2e983
commit
bf03985ea4
@ -52,7 +52,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
|
||||
|
||||
- (void)setAttentionLine:(BOOL)attentionLine
|
||||
{
|
||||
_serialPort->set_input(Commodore::Serial::Line::Attention, attentionLine ? Commodore::Serial::LineLevel::High : Commodore::Serial::LineLevel::Low);
|
||||
_serialPort->set_output(Commodore::Serial::Line::Attention, attentionLine ? Commodore::Serial::LineLevel::High : Commodore::Serial::LineLevel::Low);
|
||||
}
|
||||
|
||||
- (BOOL)attentionLine
|
||||
@ -62,7 +62,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
|
||||
|
||||
- (void)setDataLine:(BOOL)dataLine
|
||||
{
|
||||
_serialPort->set_input(Commodore::Serial::Line::Data, dataLine ? Commodore::Serial::LineLevel::High : Commodore::Serial::LineLevel::Low);
|
||||
_serialPort->set_output(Commodore::Serial::Line::Data, dataLine ? Commodore::Serial::LineLevel::High : Commodore::Serial::LineLevel::Low);
|
||||
}
|
||||
|
||||
- (BOOL)dataLine
|
||||
@ -72,7 +72,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
|
||||
|
||||
- (void)setClockLine:(BOOL)clockLine
|
||||
{
|
||||
_serialPort->set_input(Commodore::Serial::Line::Clock, clockLine ? Commodore::Serial::LineLevel::High : Commodore::Serial::LineLevel::Low);
|
||||
_serialPort->set_output(Commodore::Serial::Line::Clock, clockLine ? Commodore::Serial::LineLevel::High : Commodore::Serial::LineLevel::Low);
|
||||
}
|
||||
|
||||
- (BOOL)clockLine
|
||||
|
@ -23,9 +23,17 @@ class C1540Tests: XCTestCase {
|
||||
|
||||
// MARK: EOI
|
||||
|
||||
func testEOI() {
|
||||
func testTransmission() {
|
||||
with1540 {
|
||||
$0.runForCycles(20)
|
||||
// allow some booting time
|
||||
$0.runForCycles(2000000)
|
||||
|
||||
// I want to be talker, so hold attention and clock low
|
||||
$0.clockLine = false
|
||||
$0.attentionLine = false
|
||||
$0.runForCycles(200)
|
||||
|
||||
XCTAssert($0.dataLine == false, "Listener should have taken data line low")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user