From 906241d5257f99b9c7de2da5340f5a59c2fb688d Mon Sep 17 00:00:00 2001 From: XmiliaH <45106915+XmiliaH@users.noreply.github.com> Date: Wed, 1 Nov 2023 12:27:00 +0100 Subject: Test expecting an excpetion is missing an fail (#29) --- chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java | 1 + 1 file changed, 1 insertion(+) (limited to 'chapter05/src/test/java/com/seaofnodes') diff --git a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java index ab956e9f..5ac309f3 100644 --- a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java +++ b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java @@ -301,6 +301,7 @@ return c; public void testSelfAssign() { try { new Parser("int a=a; return a;").parse(); + fail(); } catch( RuntimeException e ) { assertEquals("Undefined name 'a'",e.getMessage()); } -- cgit v1.2.3