2019-02-04 23:52:21 +00:00
|
|
|
|
// <copyright file="TestHarness.cs" company="Adrian Conlon">
|
|
|
|
|
// Copyright (c) Adrian Conlon. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
namespace Test
|
2019-02-02 15:12:51 +00:00
|
|
|
|
{
|
|
|
|
|
internal class TestHarness
|
|
|
|
|
{
|
|
|
|
|
private Board board;
|
|
|
|
|
|
|
|
|
|
public TestHarness(Configuration configuration)
|
|
|
|
|
{
|
2019-02-04 23:52:21 +00:00
|
|
|
|
this.board = new Board(configuration);
|
2019-02-02 15:12:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Run()
|
|
|
|
|
{
|
2019-02-04 23:52:21 +00:00
|
|
|
|
this.board.Initialize();
|
|
|
|
|
this.board.RaisePOWER();
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-04 23:52:21 +00:00
|
|
|
|
var cpu = this.board.CPU;
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
|
|
|
|
while (cpu.Powered)
|
2019-02-04 23:52:21 +00:00
|
|
|
|
{
|
2019-02-02 15:12:51 +00:00
|
|
|
|
cpu.Step();
|
2019-02-04 23:52:21 +00:00
|
|
|
|
}
|
2019-02-02 15:12:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|