summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-05-13 16:31:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-13 16:31:53 +0000
commit45693e50ecdae9b456e4974dd91758f9e25df2b4 (patch)
tree5c879b2b23ad900d56f886574a54550f0bc224d8 /tools
parente3b43270e87fd85a6281c91f2897233aac6b6397 (diff)
parentc9a4badb54320f8c52d2da06a762b5e6eef00ee0 (diff)
downloadframeworks_base-45693e50ecdae9b456e4974dd91758f9e25df2b4.zip
frameworks_base-45693e50ecdae9b456e4974dd91758f9e25df2b4.tar.gz
frameworks_base-45693e50ecdae9b456e4974dd91758f9e25df2b4.tar.bz2
am c9a4badb: am d915dcac: Layoutlib tests now check methods return value [DO NOT MERGE]
* commit 'c9a4badb54320f8c52d2da06a762b5e6eef00ee0': 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(