commit | 9c36a99ebc8a9a82af86d9e86453b09f9e64b4e8 | [log] [tgz] |
---|---|---|
author | Florian Mayer <fmayer@google.com> | Tue Oct 23 14:09:48 2018 +0100 |
committer | Florian Mayer <fmayer@google.com> | Tue Oct 23 18:10:41 2018 +0100 |
tree | 9ffba680d73b93d75d7365091311d78d52097c3a | |
parent | 33eb65278338804b9847618e6295f8f29bd4b236 [diff] [blame] |
Fix off by one error. Change-Id: I18a2d177f3212626b7091150f42dfe151e47570e
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, invalid_register) { + RegsImplFake<uint64_t> regs(64); + RegsInfo<uint64_t> info(®s); + + EXPECT_DEATH(info.Save(RegsInfo<uint64_t>::MAX_REGISTERS), ""); +} + } // namespace unwindstack