Skip to content

Commit

Permalink
Stop using class name heuristics to filter out non-tests.
Browse files Browse the repository at this point in the history
The bug that made that necessary has been fixed by now.

	Change on 2018/04/18 by mkretzschmar <[email protected]>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193361163
  • Loading branch information
martinkretzschmar authored and tomball committed Apr 23, 2018
1 parent d0fc14c commit ff8ef0b
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.junit.runner.RunWith;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunListener;
import org.junit.runners.JUnit4;
import org.junit.runners.Suite;

/*-[
Expand Down Expand Up @@ -259,15 +258,8 @@ protected boolean isJUnit3TestClass(Class<?> cls) {
return false;
}

/**
* @return true if {@param cls} is {@link JUnit4} annotated.
*/
/** @return true if {@param cls} is {@link RunWith} annotated. */
protected boolean isJUnit4TestClass(Class<?> cls) {
// Need to find test classes, otherwise crashes with b/11790448.
if (!cls.getName().endsWith("Test")) {
return false;
}
// Check the annotation.
return cls.getAnnotation(RunWith.class) != null;
}

Expand Down

0 comments on commit ff8ef0b

Please sign in to comment.