SPC700 to get notified when ports are written

This commit is contained in:
scawful
2023-08-26 02:33:19 -04:00
parent 2b8d41c6ca
commit a2de3c2ffe
8 changed files with 76 additions and 36 deletions

View File

@@ -150,24 +150,6 @@ class CPUTest : public ::testing::Test {
using ::testing::_;
using ::testing::Return;
TEST_F(CPUTest, CPURunTest) {
// Arrange
EXPECT_CALL(mock_clock, UpdateClock(_)).Times(1);
EXPECT_CALL(mock_clock, GetCycleCount()).WillOnce(Return(1));
EXPECT_CALL(mock_clock, ResetAccumulatedTime()).Times(1);
mock_memory.InsertMemory(0x00, {0x69, 0x01, 0xEA, 0xEA});
// Act
mock_clock.UpdateClock(1.0);
cpu.Update();
mock_clock.ResetAccumulatedTime();
// Assert
// Google Mock will automatically check the expectations
ASSERT_THAT(cpu.A, ::testing::Eq(0x01));
}
// ============================================================================
// Infrastructure
// ============================================================================