aboutsummaryrefslogtreecommitdiff
path: root/test/core/src
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2021-03-13 17:06:20 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2021-03-13 18:19:35 +0100
commitc979ee9ddfe0e990c1527d45c8429397601e4f52 (patch)
tree5184ebcb639507482a29a70d449f8cee0adf2558 /test/core/src
parente8cd744d3b2d986dd847b9ff6bdf2750a8dd6764 (diff)
downloadlombok-c979ee9ddfe0e990c1527d45c8429397601e4f52.tar.gz
lombok-c979ee9ddfe0e990c1527d45c8429397601e4f52.tar.bz2
lombok-c979ee9ddfe0e990c1527d45c8429397601e4f52.zip
[testing] now easier to identify what failed, by name of test case
test case names now include idempotent/javac/ecj/prettyprint as a prefix to the test case filename.
Diffstat (limited to 'test/core/src')
-rw-r--r--test/core/src/lombok/DirectoryRunner.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/src/lombok/DirectoryRunner.java b/test/core/src/lombok/DirectoryRunner.java
index 93b18039..b041c42e 100644
--- a/test/core/src/lombok/DirectoryRunner.java
+++ b/test/core/src/lombok/DirectoryRunner.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2020 The Project Lombok Authors.
+ * Copyright (C) 2009-2021 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -78,6 +78,9 @@ public class DirectoryRunner extends Runner {
}
public abstract boolean expectChanges();
+ public String testNamePrefix() {
+ return "";
+ }
}
private static final FileFilter JAVA_FILE_FILTER = new FileFilter() {
@@ -114,8 +117,7 @@ public class DirectoryRunner extends Runner {
Throwable error = null;
try {
addTests(testClass);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
error = t;
}
this.failure = error;
@@ -124,7 +126,7 @@ public class DirectoryRunner extends Runner {
private void addTests(Class<?> testClass) throws Exception {
for (File file : params.getBeforeDirectory().listFiles(JAVA_FILE_FILTER)) {
if (!params.accept(file)) continue;
- Description testDescription = Description.createTestDescription(testClass, file.getName());
+ Description testDescription = Description.createTestDescription(testClass, this.params.testNamePrefix() + file.getName());
description.addChild(testDescription);
tests.put(file.getName(), testDescription);
}