[test framework] TestCaseLoader: do not add _FirstInSuiteTest and _LastInSuiteTest when they're just found in the classpath

GitOrigin-RevId: 160d40eaa2f9c2d8f421c7fe195d43114c609d55
This commit is contained in:
Vladislav Rassokhin
2025-02-21 20:45:19 +00:00
committed by intellij-monorepo-bot
parent 886cd1bbb8
commit a6dfdbe7bd
@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij;
import com.intellij.idea.ExcludeFromTestDiscovery;
@@ -279,6 +279,9 @@ public class TestCaseLoader {
if (!myTestClassesFilter.matches(className, moduleName)) return false;
if (myFirstTestClass != null && className.equals(myFirstTestClass.getName())) return false;
if (myLastTestClass != null && className.equals(myLastTestClass.getName())) return false;
// Ignore those classes even if they're not set as myFirstTestClass and myLastTestClass
if (className.equals("_FirstInSuiteTest")) return false;
if (className.equals("_LastInSuiteTest")) return false;
return true;
}