summaryrefslogtreecommitdiff
path: root/Q1.tests/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Q1.tests/Core')
-rw-r--r--Q1.tests/Core/AddressingModesTests.cs20
-rw-r--r--Q1.tests/Core/InstructionsTests.cs20
2 files changed, 40 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