Skip to content

Commit

Permalink
removes deprecated calls and fixes modules names in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Jun 1, 2023
1 parent 5c1c017 commit e10bf78
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/org/rascalmpl/test/infrastructure/RascalJUnitTestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ public Description getDescription() {

// the order of the tests aren't decided by this list so no need to randomly order them.
for (AbstractFunction f : tests) {
modDesc.addChild(Description.createTestDescription(clazz, computeTestName(f.getName(), f.getAst().getLocation())));
modDesc.addChild(Description.createTestDescription(module, computeTestName(f.getName(), f.getAst().getLocation())));
}
}
catch (Throwable e) {
System.err.println("[ERROR] " + e);
desc.addChild(modDesc);

Description testDesc = Description.createTestDescription(clazz, name + "compilation failed", new CompilationFailed() {
Description testDesc = Description.createTestDescription(module, name + "compilation failed", new CompilationFailed() {
@Override
public Class<? extends Annotation> annotationType() {
return getClass();
Expand All @@ -243,7 +243,6 @@ public void run(final RunNotifier notifier) {
if (desc == null) {
desc = getDescription();
}
notifier.fireTestRunStarted(desc);

for (Description mod : desc.getChildren()) {
if (mod.getAnnotations().stream().anyMatch(t -> t instanceof CompilationFailed)) {
Expand All @@ -255,8 +254,6 @@ public void run(final RunNotifier notifier) {
TestEvaluator runner = new TestEvaluator(evaluator, listener);
runner.test(mod.getDisplayName());
}

notifier.fireTestRunFinished(new Result());
}

private final class Listener implements ITestResultListener {
Expand All @@ -283,7 +280,7 @@ private Description getDescription(String name, ISourceLocation loc) {

@Override
public void start(String context, int count) {
notifier.fireTestRunStarted(module);
// notifier.fireTestRunStarted(module);
}

@Override
Expand All @@ -306,7 +303,7 @@ public void report(boolean successful, String test, ISourceLocation loc, String

@Override
public void done() {
notifier.fireTestRunFinished(new Result());
// notifier.fireTestRunFinished(new Result());
}
}
}

0 comments on commit e10bf78

Please sign in to comment.