<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 28, 2016 at 9:10 PM Jason Molenda via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
+  EXPECT_TRUE(regloc.GetOffset() == -8);<br class="gmail_msg"></blockquote><div>This should be </div><div><br></div><div>EXPECT_EQ(-8, regloc.GetOffset());</div><div><br></div><div>That way if it fails, you'll get a handy error message that says:</div><div><br></div><div>Expected: -8</div><div>Actual: -7</div><div><br></div><div>If you use EXPECT_TRUE, it's not going to tell you the actual value.  The same goes for many other places in the file.  Note that you're supposed to put the expected value *first*.  The test is the same either way obviously, but it affects the printing of the above message.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br class="gmail_msg">
+  // these could be set to IsSame and be valid -- meaning that the<br class="gmail_msg">
+  // register value is the same as the caller's -- but I'd rather<br class="gmail_msg">
+  // they not be mentioned at all.<br class="gmail_msg">
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rbp, regloc) == false);<br class="gmail_msg">
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_r15, regloc) == false);<br class="gmail_msg">
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_r14, regloc) == false);<br class="gmail_msg">
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_r13, regloc) == false);<br class="gmail_msg">
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_r12, regloc) == false);<br class="gmail_msg">
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rbx, regloc) == false);<br class="gmail_msg"></blockquote><div>If you're using EXPECT_TRUE and EXPECT_FALSE, I think it's more intuitive to not use the comparison operator.  The above is just</div><div><br></div><div>EXPECT_FALSE(row_sp->GetRegisterInfo(k_rbx, regloc));</div></div></div>