summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-08-13 00:34:38 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-08-13 00:34:38 +0000
commit87cf89ca6aff0d2282af0c9d8e17340307d27bdd (patch)
tree5dd26b2f4810f1d135ad0c93fb8d6e9d583ae199
parent3a2607a5047fe873e939b6e945f2d54ea89b05bd (diff)
parentcfdeaf19e10b9401c43d61822ce91a9b5c4f7b52 (diff)
Merge "libbinder: can't remark binder stability"
-rw-r--r--libs/binder/tests/binderStabilityTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/binder/tests/binderStabilityTest.cpp b/libs/binder/tests/binderStabilityTest.cpp
index 490850ebf4..0336b9e3ab 100644
--- a/libs/binder/tests/binderStabilityTest.cpp
+++ b/libs/binder/tests/binderStabilityTest.cpp
@@ -275,6 +275,14 @@ TEST(BinderStability, MarkingObjectNoDestructTest) {
ASSERT_TRUE(MarksStabilityInConstructor::gDestructed);
}
+TEST(BinderStability, RemarkDies) {
+ ASSERT_DEATH({
+ sp<IBinder> binder = new BBinder();
+ Stability::markCompilationUnit(binder.get()); // <-- only called for tests
+ Stability::markVndk(binder.get()); // <-- only called for tests
+ }, "Should only mark known object.");
+}
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);