From bd8bf9f22155646402daa6d7b0fbeecfbe507c22 Mon Sep 17 00:00:00 2001
From: aalsaqer <aalsaqer@student.unimelb.edu.au>
Date: Sat, 1 Sep 2018 15:45:26 +1000
Subject: [PATCH] latest changes

---
 examples/invalidJZ.s                            |  2 +-
 mutants/mutant-5/swen90006/machine/Machine.java |  2 +-
 test/swen90006/machine/BoundaryTests.java       | 10 +++++++++-
 test/swen90006/machine/PartitioningTests.java   |  1 +
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/examples/invalidJZ.s b/examples/invalidJZ.s
index c431909..824b2d9 100644
--- a/examples/invalidJZ.s
+++ b/examples/invalidJZ.s
@@ -5,5 +5,5 @@
 		MOV R4 100
 
  		SUB R4 R3 R2
- 		JZ R4 10000
+ 		JZ R4 -10000
  		RET R4
\ No newline at end of file
diff --git a/mutants/mutant-5/swen90006/machine/Machine.java b/mutants/mutant-5/swen90006/machine/Machine.java
index 9944285..f2a92be 100644
--- a/mutants/mutant-5/swen90006/machine/Machine.java
+++ b/mutants/mutant-5/swen90006/machine/Machine.java
@@ -306,6 +306,6 @@ public class Machine
   }
   
   public void Bomb() throws InvalidInstructionException{
-	  throw new InvalidActivityException();
+	  throw new InvalidInstructionException();
   }
 }
diff --git a/test/swen90006/machine/BoundaryTests.java b/test/swen90006/machine/BoundaryTests.java
index 9124b2b..8124b3e 100644
--- a/test/swen90006/machine/BoundaryTests.java
+++ b/test/swen90006/machine/BoundaryTests.java
@@ -47,9 +47,17 @@ public class BoundaryTests
 	//Test test opens a file and executes the machine
 	@Test public void aFileOpenTest()
 	{
-		final List<String> lines = readInstructions("C:\\Users\\ASUS\\git\\SWEN90006-A1-2018\\examples\\array.s");
+		final List<String> lines = readInstructions("examples\\array.s");
 		Machine m = new Machine();
 		assertEquals(m.execute(lines), 45);
+		assertEquals(m.getCount(),162);
+	}
+
+	@Test public void validAdd()
+	{
+		final List<String> lines = readInstructions("examples\\div_test2.s");
+		Machine m = new Machine();
+		assertEquals(m.execute(lines), 20);
 	}
 
 	//To test an exception, specify the expected exception after the @Test
diff --git a/test/swen90006/machine/PartitioningTests.java b/test/swen90006/machine/PartitioningTests.java
index 7cefc33..3348067 100644
--- a/test/swen90006/machine/PartitioningTests.java
+++ b/test/swen90006/machine/PartitioningTests.java
@@ -82,6 +82,7 @@ public class PartitioningTests
 	    final List<String> lines = readInstructions("examples/array.s");
 	    Machine m = new Machine();
 	    assertEquals(m.execute(lines), 45);	    
+	    assertEquals(m.getCount(),162);
   }
   
   // Equivalance Class 1
-- 
GitLab