File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 22
33import eotree .EOBnd ;
44import eotree .EOBndExpr ;
5+ import tree .Declaration .ClassDeclaration ;
56import tree .Declaration .Declaration ;
67import tree .Declaration .MethodDeclaration ;
8+ import tree .Declaration .NormalClassDeclaration ;
79
810public class Declarations {
911
1012 public static EOBndExpr mapDeclaration (Declaration dec ) {
1113 if (dec instanceof MethodDeclaration ) {
1214 return Methods .mapMethodDeclaration ((MethodDeclaration ) dec );
15+ }
16+ else if (dec instanceof NormalClassDeclaration ) {
17+ return (EOBndExpr ) Classes .mapClass ((ClassDeclaration ) dec );
1318 } else
1419 throw new IllegalArgumentException ("Declaration of type " +
1520 dec .getClass ().getSimpleName ()
Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ private ArrayList<DynamicTest> testChapter(String chapterPath) {
138138
139139 private static DynamicTest testFile (Path path ) {
140140 return DynamicTest .dynamicTest (
141- path .getFileName ().toString (), () -> {
141+ path .getParent ().getFileName ().toString () + "/" +
142+ path .getFileName ().toString (), () -> {
142143 // Compile and execute Java file
143144 String javaExecOutput = compileAndExecuteJava (path );
144145
You can’t perform that action at this time.
0 commit comments