summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-05-13 02:20:13 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-13 02:20:13 +0000
commitc9a4badb54320f8c52d2da06a762b5e6eef00ee0 (patch)
treecfbb8bbb9f678dde1c9a37728f94a197721d172b /tools
parentbdd8fbf6eae886dc3b2cd716745ede918773a2c4 (diff)
parentd915dcac365b6d3ad88afab52e74ccca7dfbefec (diff)
downloadframeworks_base-c9a4badb54320f8c52d2da06a762b5e6eef00ee0.zip
frameworks_base-c9a4badb54320f8c52d2da06a762b5e6eef00ee0.tar.gz
frameworks_base-c9a4badb54320f8c52d2da06a762b5e6eef00ee0.tar.bz2
am d915dcac: Layoutlib tests now check methods return value [DO NOT MERGE]
* commit 'd915dcac365b6d3ad88afab52e74ccca7dfbefec': Layoutlib tests now check methods return value [DO NOT MERGE]
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java
index d3218db..7c0bc84 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java
@@ -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(