EightBitNet/MC6809/MC6809.UnitTest/AslTests.cs
Adrian Conlon 72932cf462 Correct a few more style/correctness issues.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-05-06 11:02:20 +01:00

45 lines
1.1 KiB
C#

// <copyright file="AslTests.cs" company="Adrian Conlon">
// Copyright (c) Adrian Conlon. All rights reserved.
// </copyright>
namespace EightBit
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class AslTests
{
private readonly Board board = new Board();
private readonly MC6809 cpu;
public AslTests()
{
this.cpu = this.board.CPU;
this.board.Poke(0, 0x48);
}
[TestInitialize]
public void Initialise()
{
this.board.RaisePOWER();
this.cpu.Step(); // Step over the reset
}
[TestCleanup]
public void Cleanup() => this.board.LowerPOWER();
[TestMethod]
public void TestInherent()
{
this.cpu.A = 0x7a;
this.cpu.Step();
Assert.AreEqual(0xf4, this.cpu.A);
Assert.AreEqual(0, this.cpu.Zero);
Assert.AreNotEqual(0, this.cpu.Overflow);
Assert.AreNotEqual(0, this.cpu.Negative);
Assert.AreEqual(2, this.cpu.Cycles);
}
}
}