b2ff57b17efb727c24b096ac7b1d7f8870bf1bde |
|
11-Feb-2017 |
Maurice Lam <yukl@google.com> |
Use constants=BuildConfig.class for robolectric In robolectric tests, use @Config(constants=BuildConfig.class), which is the "gradle way" to configure Robolectric. Added the hacks that are needed to make that happen in our setup, like PatchedGradleManifestFactory and the custom build directory lookup. Having this change allows Robolectric tests to run against merged resources, which means different build variants will now resolve resources correctly. Previously a test would fail in, say, resolving @style/SuwThemeGlif. Also migrated GlifDimensionTest to run on Robolectric. Test: ./gradlew test Change-Id: Ia7231f95818891a649678a0a6da0220a44031bf7
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/robolectric/SuwLibRobolectricTestRunner.java
|