diff options
-rw-r--r-- | libs/binder/tests/binderStabilityTest.cpp | 8 |
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); |