mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-01-08 16:31:38 +00:00
Correct a few more style/correctness issues.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
3d0e4250a0
commit
72932cf462
@ -65,26 +65,10 @@ namespace EightBit
|
||||
|
||||
public ref byte High => ref this.high;
|
||||
|
||||
public static Register16 operator ++(Register16 value) => Increment(value);
|
||||
|
||||
public static Register16 operator --(Register16 value) => Decrement(value);
|
||||
|
||||
public static bool operator ==(Register16 left, Register16 right) => left.Equals(right);
|
||||
|
||||
public static bool operator !=(Register16 left, Register16 right) => !(left == right);
|
||||
|
||||
public static Register16 Increment(Register16 value)
|
||||
{
|
||||
++value.Word;
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Register16 Decrement(Register16 value)
|
||||
{
|
||||
--value.Word;
|
||||
return value;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var rhs = obj as Register16;
|
||||
|
@ -1,5 +1,8 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
// <copyright file="AssemblyInfo.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="AbxTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="AdcTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="AddTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="AndTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="AslTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="AsrTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="BgtTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
@ -14,10 +18,10 @@
|
||||
|
||||
this.board.Poke(0, 0x2e); // BGT
|
||||
this.board.Poke(1, 0x03);
|
||||
this.board.Poke(2, 0x86); // LDA #1
|
||||
this.board.Poke(2, 0x86); // LDA #1
|
||||
this.board.Poke(3, 0x01);
|
||||
this.board.Poke(4, 0x12); // NOP
|
||||
this.board.Poke(5, 0x86); // LDA #2
|
||||
this.board.Poke(5, 0x86); // LDA #2
|
||||
this.board.Poke(6, 0x02);
|
||||
this.board.Poke(7, 0x12); // NOP
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="BhiTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
@ -14,12 +18,12 @@
|
||||
|
||||
this.board.Poke(0, 0x22); // BHI
|
||||
this.board.Poke(1, 0x03);
|
||||
this.board.Poke(2, 0x86); // LDA #1
|
||||
this.board.Poke(2, 0x86); // LDA #1
|
||||
this.board.Poke(3, 0x01);
|
||||
this.board.Poke(4, 0x12); // NOP
|
||||
this.board.Poke(5, 0x86); // LDA #2
|
||||
this.board.Poke(5, 0x86); // LDA #2
|
||||
this.board.Poke(6, 0x02);
|
||||
this.board.Poke(7, 0x12); // NOP
|
||||
this.board.Poke(7, 0x12); // NOP
|
||||
}
|
||||
|
||||
[TestInitialize]
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="BitTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="BleTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
@ -14,10 +18,10 @@
|
||||
|
||||
this.board.Poke(0, 0x2f); // BLE
|
||||
this.board.Poke(1, 0x03);
|
||||
this.board.Poke(2, 0x86); // LDA #1
|
||||
this.board.Poke(2, 0x86); // LDA #1
|
||||
this.board.Poke(3, 0x01);
|
||||
this.board.Poke(4, 0x12); // NOP
|
||||
this.board.Poke(5, 0x86); // LDA #2
|
||||
this.board.Poke(5, 0x86); // LDA #2
|
||||
this.board.Poke(6, 0x02);
|
||||
this.board.Poke(7, 0x12); // NOP
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="Board.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
public sealed class Board : EightBit.Bus
|
||||
{
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="ClrTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="CmpTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="DecTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="IncTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
namespace EightBit
|
||||
// <copyright file="JsrTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
// https://github.com/sorenroug/osnine-java/blob/master/core/src/test/java/org/roug/osnine/BranchAndJumpTest.java
|
||||
|
||||
[TestClass]
|
||||
public class JsrTests
|
||||
{
|
||||
|
@ -84,6 +84,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<AdditionalFiles Include="stylecop.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers.1.1.118\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
|
||||
|
@ -1,3 +1,7 @@
|
||||
// <copyright file="AssemblyInfo.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -1,9 +1,12 @@
|
||||
namespace EightBit
|
||||
// <copyright file="RtsTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
// https://github.com/sorenroug/osnine-java/blob/master/core/src/test/java/org/roug/osnine/BranchAndJumpTest.java
|
||||
|
||||
[TestClass]
|
||||
public class RtsTests
|
||||
{
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="SbcTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace EightBit
|
||||
// <copyright file="SubTests.cs" company="Adrian Conlon">
|
||||
// Copyright (c) Adrian Conlon. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
19
MC6809/MC6809.UnitTest/stylecop.json
Normal file
19
MC6809/MC6809.UnitTest/stylecop.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
// ACTION REQUIRED: This file was automatically added to your project, but it
|
||||
// will not take effect until additional steps are taken to enable it. See the
|
||||
// following page for additional information:
|
||||
//
|
||||
// https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/EnableConfiguration.md
|
||||
|
||||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||
"settings": {
|
||||
"documentationRules": {
|
||||
"documentInterfaces": false,
|
||||
"documentExposedElements": false,
|
||||
"documentInternalElements": false,
|
||||
"documentPrivateElements": false,
|
||||
"documentPrivateFields": false,
|
||||
"companyName": "Adrian Conlon"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user