From ffa2a641fc17474f3af69e6853e29880feaa1784 Mon Sep 17 00:00:00 2001 From: He Zhu <h.zhu18@student.unimelb.edu.au> Date: Mon, 3 Sep 2018 15:18:11 +1000 Subject: [PATCH] Update BoundaryTests.java --- test/swen90006/machine/BoundaryTests.java | 67 ----------------------- 1 file changed, 67 deletions(-) diff --git a/test/swen90006/machine/BoundaryTests.java b/test/swen90006/machine/BoundaryTests.java index d477b87..5486956 100644 --- a/test/swen90006/machine/BoundaryTests.java +++ b/test/swen90006/machine/BoundaryTests.java @@ -146,63 +146,7 @@ public class BoundaryTests m.execute(lines); throw new ArrayIndexOutOfBoundsException(); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //Any method annotation with "@Test" is executed as a test. - @Test public void aTest() - { - //the assertEquals method used to check whether two values are - //equal, using the equals method - final int expected = 2; - final int actual = 1 + 1; - assertEquals(expected, actual); - } - @Test public void anotherTest() - { - List<String> list = new ArrayList<String>(); - list.add("a"); - list.add("b"); - - //the assertTrue method is used to check whether something holds. - assertTrue(list.contains("a")); - } - //To test an exception, specify the expected exception after the @Test @Test(expected = java.io.IOException.class) public void anExceptionTest() @@ -211,17 +155,6 @@ public class BoundaryTests throw new java.io.IOException(); } - //This test should fail. - //To provide additional feedback when a test fails, an error message - //can be included - @Test public void aFailedTest() - { - //include a message for better feedback - final int expected = 2; - final int actual = 1 + 2; - assertEquals("Some failure message", expected, actual); - } - //Read in a file containing a program and convert into a list of //string instructions private List<String> readInstructions(String file) -- GitLab