Search in sources :

Example 1 with GWTTestCase

use of com.google.gwt.junit.client.GWTTestCase in project guava by google.

the class GwtTestSuite method suite.

public static Test suite() throws IOException {
    GWTTestSuite suite = new GWTTestSuite();
    for (ClassInfo info : ClassPath.from(GwtTestSuite.class.getClassLoader()).getTopLevelClasses()) {
        if (info.getName().endsWith("_gwt")) {
            Class<?> clazz = info.load();
            // TODO(cpovirk): why does asSubclass() throw? Is it something about ClassLoaders?
            @SuppressWarnings("unchecked") Class<? extends GWTTestCase> cast = (Class<? extends GWTTestCase>) clazz;
            suite.addTestSuite(cast);
        }
    }
    return suite;
}
Also used : GWTTestCase(com.google.gwt.junit.client.GWTTestCase) GWTTestSuite(com.google.gwt.junit.tools.GWTTestSuite) ClassInfo(com.google.common.reflect.ClassPath.ClassInfo)

Aggregations

ClassInfo (com.google.common.reflect.ClassPath.ClassInfo)1 GWTTestCase (com.google.gwt.junit.client.GWTTestCase)1 GWTTestSuite (com.google.gwt.junit.tools.GWTTestSuite)1