Lines Matching defs:test
17 package android.test;
44 public static List<String> getTestCaseNames(Test test, boolean flatten) {
45 List<Test> tests = (List<Test>) getTests(test, flatten);
53 public static List<? extends Test> getTests(Test test, boolean flatten) {
54 return getTests(test, flatten, new HashSet<Class<?>>());
57 private static List<? extends Test> getTests(Test test, boolean flatten,
60 if (test != null) {
65 * invoke the suite() method, because we will run all test methods
68 if (test instanceof TestCase &&
69 ((TestCase)test).getName() == null) {
70 workingTest = invokeSuiteMethodIfPossible(test.getClass(),
74 workingTest = test;
123 public static String getTestName(Test test) {
124 if (test instanceof TestCase) {
125 TestCase testCase = (TestCase) test;
127 } else if (test instanceof TestSuite) {
128 TestSuite testSuite = (TestSuite) test;
146 Test test = (Test) enumeration.nextElement();
148 return test;
158 Test test = invokeSuiteMethodIfPossible(testClass,
160 if (test == null) {
163 } else if (TestCase.class.isAssignableFrom(test.getClass())) {
164 TestSuite testSuite = new TestSuite(test.getClass().getName());
165 testSuite.addTest(test);
169 return (TestSuite) test;