[Lldb-commits] [PATCH] D24919: Adding a RegisterContextMinidump_x86_64 converter

Dimitar Vlahovski via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 27 09:15:23 PDT 2016


dvlahovski added inline comments.

================
Comment at: unittests/Process/minidump/MinidumpParserTest.cpp:177
@@ +176,3 @@
+#define REG_VAL(x) *(reinterpret_cast<uint64_t *>(x))
+
+TEST_F(MinidumpParserTest, ConvertRegisterContext) {
----------------
amccarth wrote:
> `EXPECT_xxx` will check the condition and report if it's wrong.  But then the test proceeds.
> 
> `ASSERT_xxx` will check the condition, and, if it's wrong, it will report _and_ terminate the current test.
> 
> So my rule of thumb is:
> 
> 1.  Prefer `EXPECT_xxx` when checking that the code does what it's supposed to do.
> 2.  Use `ASSERT_xxx` when the rest of the test depends on this condition.
Thanks :)


https://reviews.llvm.org/D24919





More information about the lldb-commits mailing list