mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-08 14:25:05 +00:00
Here's an instantly failing test...
This commit is contained in:
@@ -52,7 +52,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
|
|||||||
|
|
||||||
- (void)setAttentionLine:(BOOL)attentionLine
|
- (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
|
- (BOOL)attentionLine
|
||||||
@@ -62,7 +62,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
|
|||||||
|
|
||||||
- (void)setDataLine:(BOOL)dataLine
|
- (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
|
- (BOOL)dataLine
|
||||||
@@ -72,7 +72,7 @@ class VanillaSerialPort: public Commodore::Serial::Port {
|
|||||||
|
|
||||||
- (void)setClockLine:(BOOL)clockLine
|
- (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
|
- (BOOL)clockLine
|
||||||
|
@@ -23,9 +23,17 @@ class C1540Tests: XCTestCase {
|
|||||||
|
|
||||||
// MARK: EOI
|
// MARK: EOI
|
||||||
|
|
||||||
func testEOI() {
|
func testTransmission() {
|
||||||
with1540 {
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user