[llvm] r192854 - Invert arguments to ASSERT_EQ to match gtest diagnostic printing

David Blaikie dblaikie at gmail.com
Wed Oct 16 15:43:10 PDT 2013


Author: dblaikie
Date: Wed Oct 16 17:43:10 2013
New Revision: 192854

URL: http://llvm.org/viewvc/llvm-project?rev=192854&view=rev
Log:
Invert arguments to ASSERT_EQ to match gtest diagnostic printing

GTest assumes the left hand side of the assert is the expectation and
the right hand side is the test result. It's easier to read gtest
failures when these things are ordered correctly.

Modified:
    llvm/trunk/unittests/CodeGen/DIEHashTest.cpp

Modified: llvm/trunk/unittests/CodeGen/DIEHashTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CodeGen/DIEHashTest.cpp?rev=192854&r1=192853&r2=192854&view=diff
==============================================================================
--- llvm/trunk/unittests/CodeGen/DIEHashTest.cpp (original)
+++ llvm/trunk/unittests/CodeGen/DIEHashTest.cpp Wed Oct 16 17:43:10 2013
@@ -23,6 +23,6 @@ TEST(DIEHashData1Test, DIEHash) {
   DIEInteger Size(4);
   Die.addValue(dwarf::DW_AT_byte_size, dwarf::DW_FORM_data1, &Size);
   uint64_t MD5Res = Hash.computeTypeSignature(&Die);
-  ASSERT_EQ(MD5Res, 0x4F68EF1039F8D2BULL);
+  ASSERT_EQ(0x4F68EF1039F8D2BULL, MD5Res);
 }
 }





More information about the llvm-commits mailing list