robolectric/robolectric — pull request #985 by sneuberger-amazon (2014-02-28 04:20:59+00:00)
Title: Add version qualifier awareness to resource resolution (fixes #724)

From my comment in #724: "Robolectric is reading windowNoTitle=true from appcompat's res/values/themes_base.xml. However, Robolectric is targeting API 16/17/18, so it should be reading res/values-v14/themes_base.xml."

This fixes two bugs then:
- Robolectric requires exact match for a version qualifier, but it should be matching the closest version that doesn't go over (e.g., v14 should apply when targeting API 18)
- Robolectric was not considering resources' version qualifiers at all unless a test provided a version qualifier through the Config annotation

This obviously needs unit tests, but I wanted to first make sure the fixes I've provided are on the right track.