33import java .io .File ;
44import java .util .Arrays ;
55import java .util .List ;
6-
76import liquidjava .errors .ErrorEmitter ;
87import liquidjava .processor .RefinementProcessor ;
98import spoon .Launcher ;
109import spoon .processing .ProcessingManager ;
10+ import spoon .reflect .declaration .CtPackage ;
1111import spoon .reflect .factory .Factory ;
1212import spoon .support .QueueProcessingManager ;
1313
@@ -31,11 +31,6 @@ public static void main(String[] args) {
3131 System .out .println (ee .foundError () ? (ee .getFullMessage ()) : ("Correct! Passed Verification." ));
3232 }
3333
34- public static ErrorEmitter launchTest (String path ) {
35- ErrorEmitter ee = launch (path );
36- return ee ;
37- }
38-
3934 public static ErrorEmitter launch (String ... paths ) {
4035 System .out .println ("Running LiquidJava on: " + Arrays .toString (paths ).replaceAll ("[\\ [\\ ]]" , "" ));
4136
@@ -63,7 +58,6 @@ public static ErrorEmitter launch(String... paths) {
6358
6459 final Factory factory = launcher .getFactory ();
6560 final ProcessingManager processingManager = new QueueProcessingManager (factory );
66-
6761 final RefinementProcessor processor = new RefinementProcessor (factory , ee );
6862 processingManager .addProcessor (processor );
6963
@@ -79,4 +73,13 @@ public static ErrorEmitter launch(String... paths) {
7973
8074 return ee ;
8175 }
76+
77+ /**
78+ * Launch the LiquidJava verifier on the given file or directory path (for testing purposes)
79+ * @param path Path to to be verified
80+ * @return ErrorEmitter containing any errors found during verification
81+ */
82+ public static ErrorEmitter launchTest (String path ) {
83+ return launch (path );
84+ }
8285}
0 commit comments