Layoutlib tests now check methods return value [DO NOT MERGE]

The change is a cherry-pick from klp-dev.

The change also fixes the errors found by fixing the tests.

Change-Id: I87cef323c4eaee4e9f60475f01156b276593fa50
(cherry-picked from commit 2bd65db15f)
This commit is contained in:
Deepanshu Gupta
2014-04-15 19:30:35 -07:00
parent 877ae53586
commit d915dcac36

View File

@@ -129,6 +129,15 @@ public class TestDelegates extends TestCase {
originalClass.getName()),
delegateMethod.getAnnotation(LayoutlibDelegate.class));
// check the return type of the methods match.
assertTrue(
String.format("Delegate method %1$s.%2$s does not match the corresponding " +
"framework method which returns %3$s",
delegateClass.getName(),
getMethodName(delegateMethod),
originalMethod.getReturnType().getName()),
delegateMethod.getReturnType() == originalMethod.getReturnType());
// check that the method is static
assertTrue(
String.format(