-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcd6c35
commit e035a50
Showing
32 changed files
with
4 additions
and
754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,15 @@ | ||
package analyzer; | ||
|
||
import com.github.javaparser.StaticJavaParser; | ||
import com.github.javaparser.ast.CompilationUnit; | ||
|
||
import java.util.List; | ||
|
||
public abstract class AnalyzerTest { | ||
protected abstract Analyzer getAnalyzer(); | ||
|
||
protected Analysis analyzeResourceFile(String resourceFileName) { | ||
var resource = getClass().getResourceAsStream(resourceFileName); | ||
return analyze(StaticJavaParser.parse(resource)); | ||
} | ||
|
||
protected Analysis analyzeString(String javaCode) { | ||
return analyze(StaticJavaParser.parse(javaCode)); | ||
} | ||
|
||
private Analysis analyze(CompilationUnit compilationUnit) { | ||
protected Analysis analyze(String javaCode) { | ||
var analysis = new Analysis(); | ||
getAnalyzer().analyze(List.of(compilationUnit), analysis); | ||
getAnalyzer().analyze(List.of(StaticJavaParser.parse(javaCode)), analysis); | ||
return analysis; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
src/test/java/analyzer/exercises/hamming/HammingAnalyzerTest.java
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
src/test/java/analyzer/exercises/twofer/TwoferAnalyzerTest.java
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
src/test/resources/analyzer/exercises/hamming/ConstructorTooLong.java.txt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/test/resources/analyzer/exercises/hamming/DoesNotThrowInConstructor.java.txt
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
src/test/resources/analyzer/exercises/hamming/MethodTooLong.java.txt
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
src/test/resources/analyzer/exercises/hamming/MustUseCharAtOrCodePointAt.java.txt
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
src/test/resources/analyzer/exercises/hamming/NestedCalculation.java.txt
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
src/test/resources/analyzer/exercises/hamming/NestedValidation.java.txt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.