diff options
author | Roel Spilker <r.spilker@gmail.com> | 2020-12-21 17:15:21 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-12-22 00:27:12 +0100 |
commit | c9f6766b6365b72a155d701c2c5714b181e80a6e (patch) | |
tree | 4cd69fb91f7759772900dcbf60d0851e91163708 /test/core/src | |
parent | f17dd036384242971546bc443749ad527b8cd21c (diff) | |
download | lombok-c9f6766b6365b72a155d701c2c5714b181e80a6e.tar.gz lombok-c9f6766b6365b72a155d701c2c5714b181e80a6e.tar.bz2 lombok-c9f6766b6365b72a155d701c2c5714b181e80a6e.zip |
Run tests if no exclusions match
Diffstat (limited to 'test/core/src')
-rw-r--r-- | test/core/src/lombok/LombokTestSource.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/core/src/lombok/LombokTestSource.java b/test/core/src/lombok/LombokTestSource.java index e23a0f57..1498e635 100644 --- a/test/core/src/lombok/LombokTestSource.java +++ b/test/core/src/lombok/LombokTestSource.java @@ -65,11 +65,20 @@ public class LombokTestSource { public boolean runOnPlatform(String platform) { if (platforms == null || platforms.isEmpty()) return true; + int inclusiveCount = 0; for (String pl : platforms) { - if (pl.startsWith("!") && pl.regionMatches(true, 1, platform, 0, platform.length())) return false; + if (pl.startsWith("!")) continue; + inclusiveCount++; if (pl.equalsIgnoreCase(platform)) return true; } - return false; + if (inclusiveCount == platforms.size()) { + return false; + } + for (String pl : platforms) { + if (!pl.startsWith("!")) continue; + if (pl.regionMatches(true, 1, platform, 0, platform.length())) return false; + } + return true; } public boolean versionWithinLimit(int version) { |