[llvm] r192744 - Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.
David Blaikie
dblaikie at gmail.com
Tue Oct 15 16:00:17 PDT 2013
Author: dblaikie
Date: Tue Oct 15 18:00:17 2013
New Revision: 192744
URL: http://llvm.org/viewvc/llvm-project?rev=192744&view=rev
Log:
Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.
Also minor using namespace move so it's not hard-up against the function
definition and outside the namespace as is usual.
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=192744&r1=192743&r2=192744&view=diff
==============================================================================
--- llvm/trunk/unittests/CodeGen/DIEHashTest.cpp (original)
+++ llvm/trunk/unittests/CodeGen/DIEHashTest.cpp Tue Oct 15 18:00:17 2013
@@ -14,15 +14,15 @@
#include "llvm/Support/Format.h"
#include "gtest/gtest.h"
-namespace {
-
using namespace llvm;
+
+namespace {
TEST(DIEHashData1Test, DIEHash) {
DIEHash Hash;
DIE Die(dwarf::DW_TAG_base_type);
DIEInteger Size(4);
Die.addValue(dwarf::DW_AT_byte_size, dwarf::DW_FORM_data1, &Size);
uint64_t MD5Res = Hash.computeTypeSignature(&Die);
- ASSERT_TRUE(MD5Res == 0x540e9ff30ade3e4aULL);
+ ASSERT_EQ(MD5Res, 0x540e9ff30ade3e4aULL);
}
}
More information about the llvm-commits
mailing list