pivotal/robolectric — pull request #372 by blundell (2012-11-27 17:13:48+00:00)
Title: Add support for inch(in) and millimeter(mm) dimensions in dimens.xml

Moved the changes off my master branch so had to resubmit the pull!

When com.xtremelabs.robolectric.res.ResourceLoader encounters a dimens.xml such as the following:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="text_size">19in</dimen>
</resources>

java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "19in"
at com.xtremelabs.robolectric.res.ResourceLoader.init(ResourceLoader.java:148)

<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="text_size">86mm</dimen>
</resources>

an exception is thrown:

java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "86mm"
at com.xtremelabs.robolectric.res.ResourceLoader.init(ResourceLoader.java:148)

This pull request adds support for the Inch ("in") and Millimeter ("mm") dimension unit of measure:

http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

Mirroring this request that added point("pt")

https://github.com/pivotal/robolectric/pull/321

(deprecated pull https://github.com/pivotal/robolectric/pull/364)