Chromium Code Reviews

Unified Diff: unittests/Bitcode/NaClCompressTests.cpp

Issue 1140153004: Clean up bitcode munging tests. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix issues in patch set 2. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « lib/Bitcode/NaCl/TestUtils/NaClBitcodeMunge.cpp ('k') | unittests/Bitcode/NaClMungeTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unittests/Bitcode/NaClCompressTests.cpp
diff --git a/unittests/Bitcode/NaClCompressTests.cpp b/unittests/Bitcode/NaClCompressTests.cpp
index 3bc9e991909e296452a47f68fc5bddce7bf9f046..981cc9c31f49c8daee6fee98fcde1b9ec2b0a23e 100644
--- a/unittests/Bitcode/NaClCompressTests.cpp
+++ b/unittests/Bitcode/NaClCompressTests.cpp
@@ -8,18 +8,13 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/Bitcode/NaCl/NaClBitcodeMunge.h"
-#include "llvm/Bitcode/NaCl/NaClBitcodeParser.h"
-#include "llvm/Bitcode/NaCl/NaClLLVMBitCodes.h"
+#include "NaClMungeTest.h"
-#include "gtest/gtest.h"
+#include "llvm/Bitcode/NaCl/NaClLLVMBitCodes.h"
using namespace llvm;
-namespace {
-
-static const uint64_t Terminator = 0x5768798008978675LL;
+namespace naclmungetest {
// Note: Tests fix for bug in
// https://code.google.com/p/nativeclient/issues/detail?id=4104
@@ -41,9 +36,8 @@ TEST(NaClCompressTests, FixedModuleAbbrevIdBug) {
};
// Show textual version of sample input.
- NaClObjDumpMunger DumpMunger(BitcodeRecords,
- array_lengthof(BitcodeRecords), Terminator);
- EXPECT_TRUE(DumpMunger.runTest("Test fixed module abbreviation ID bug"));
+ NaClObjDumpMunger DumpMunger(ARRAY_TERM(BitcodeRecords));
+ EXPECT_TRUE(DumpMunger.runTest());
EXPECT_EQ(
" 0:0|<65532, 80, 69, 88, 69, 1, 0,|Magic Number: 'PEXE' (80, 69, 8"
"8, 69)\n"
@@ -63,7 +57,7 @@ TEST(NaClCompressTests, FixedModuleAbbrevIdBug) {
// Show that we can compress as well.
NaClCompressMunger CompressMunger(BitcodeRecords,
array_lengthof(BitcodeRecords), Terminator);
- EXPECT_TRUE(CompressMunger.runTest("Test fixed module abbreviation ID bug"));
+ EXPECT_TRUE(CompressMunger.runTest());
}
-}
+} // end of namespace naclmungetest
« no previous file with comments | « lib/Bitcode/NaCl/TestUtils/NaClBitcodeMunge.cpp ('k') | unittests/Bitcode/NaClMungeTest.h » ('j') | no next file with comments »

Powered by Google App Engine