summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/RegsInfoTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libunwindstack/tests/RegsInfoTest.cpp')
-rw-r--r--libunwindstack/tests/RegsInfoTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libunwindstack/tests/RegsInfoTest.cpp b/libunwindstack/tests/RegsInfoTest.cpp
index 052b5bf..a6bc2c5 100644
--- a/libunwindstack/tests/RegsInfoTest.cpp
+++ b/libunwindstack/tests/RegsInfoTest.cpp
@@ -82,4 +82,11 @@ TEST(RegsInfoTest, all) {
}
}
+TEST(RegsInfoTest, invalid_register) {
+ RegsImplFake<uint64_t> regs(64);
+ RegsInfo<uint64_t> info(&regs);
+
+ EXPECT_DEATH(info.Save(RegsInfo<uint64_t>::MAX_REGISTERS), "");
+}
+
} // namespace unwindstack