[Lldb-commits] [PATCH] D111435: [lldb] [DynamicRegisterInfo] Support setting from vector<Register>

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 11 03:59:35 PDT 2021


labath added inline comments.


================
Comment at: lldb/unittests/Target/DynamicRegisterInfoTest.cpp:176-178
+    EXPECT_NE(reg, nullptr);
+    if (!reg)
+      return;
----------------
mgorny wrote:
> labath wrote:
> > ASSERT_NE(reg, nullptr);
> Actually, the idea was to test all registers even if one failed; though I suppose since we're now starting with the lowest index, higher indices won't work either.
I'll let you in on a dirty secret. They only difference between EXPECT_xxx and ASSERT_xxx is that the ASSERT version does a `return;` in case of failure. So it does not actually terminate the test -- just the current function.

That's why the recommended practice is to use gtest macros at the top level (in the TEST function), but I've now given up on getting people to do that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111435/new/

https://reviews.llvm.org/D111435



More information about the lldb-commits mailing list