summaryrefslogtreecommitdiff
path: root/Q1.tests
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
commit18868128e18d38b706e7df14e8e683e1a9739c17 (patch)
tree6f0e0e5eee646f10cbad9c0c89c24d330bc58cc6 /Q1.tests
parentd87ab8af4c86a3fc6ee237444e372d87e536e3ef (diff)
chore: Initial commit
Diffstat (limited to 'Q1.tests')
-rw-r--r--Q1.tests/Core/AddressingModesTests.cs20
-rw-r--r--Q1.tests/Core/InstructionsTests.cs20
-rw-r--r--Q1.tests/Q1.tests.csproj27
3 files changed, 67 insertions, 0 deletions
diff --git a/Q1.tests/Core/AddressingModesTests.cs b/Q1.tests/Core/AddressingModesTests.cs
new file mode 100644
index 0000000..19be64d
--- /dev/null
+++ b/Q1.tests/Core/AddressingModesTests.cs
@@ -0,0 +1,20 @@
+namespace Q1.tests.Core;
+
+using core;
+using core.Arch;
+
+[TestFixture]
+public class AddressingModesTests
+{
+
+ [Test]
+ public void LookupShouldHaveAddressingModes()
+ {
+ var populatedModes = AddressingModes.Lookup
+ .Where(x => x != default)
+ .ToArray();
+
+ Assert.That(populatedModes, Has.Length.EqualTo(8),
+ "Expected 8 addressing modes to be defined");
+ }
+} \ No newline at end of file
diff --git a/Q1.tests/Core/InstructionsTests.cs b/Q1.tests/Core/InstructionsTests.cs
new file mode 100644
index 0000000..cc7be78
--- /dev/null
+++ b/Q1.tests/Core/InstructionsTests.cs
@@ -0,0 +1,20 @@
+namespace Q1.tests.Core;
+
+using core;
+using core.Arch;
+
+[TestFixture]
+public class InstructionsTests
+{
+
+ [Test]
+ public void LookupShouldHaveInstructions()
+ {
+ var populatedSets = InstructionSet.Lookup
+ .Where(x => x != default)
+ .ToArray();
+
+ Assert.That(populatedSets, Has.Length.EqualTo(18),
+ "Expected 8 instruction groups to be defined");
+ }
+} \ No newline at end of file
diff --git a/Q1.tests/Q1.tests.csproj b/Q1.tests/Q1.tests.csproj
new file mode 100644
index 0000000..022add0
--- /dev/null
+++ b/Q1.tests/Q1.tests.csproj
@@ -0,0 +1,27 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>net9.0</TargetFramework>
+ <LangVersion>latest</LangVersion>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <IsPackable>false</IsPackable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="coverlet.collector" Version="6.0.2"/>
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0"/>
+ <PackageReference Include="NUnit" Version="4.2.2"/>
+ <PackageReference Include="NUnit.Analyzers" Version="4.4.0"/>
+ <PackageReference Include="NUnit3TestAdapter" Version="4.6.0"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Using Include="NUnit.Framework"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\Q1.core\Q1.core.csproj" />
+ </ItemGroup>
+
+</Project>