Commit b2ff57b1 authored by Maurice Lam's avatar Maurice Lam
Browse files

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
parent 0093ffd9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment