Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: unittests/Bitcode/NaClMungeTest.h

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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « unittests/Bitcode/NaClCompressTests.cpp ('k') | unittests/Bitcode/NaClMungeWriteErrorTests.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 //===- llvm/unittest/Bitcode/NaClMungeTest.h - Test munging utils ---------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // Contains common utilities used in bitcode munge tests.
11
12 #ifndef LLVM_UNITTEST_BITCODE_NACLMUNGETEST_H
13 #define LLVM_UNITTEST_BITCODE_NACLMUNGETEST_H
14
15 #include "llvm/ADT/STLExtras.h"
16 #include "llvm/Bitcode/NaCl/NaClBitcodeMunge.h"
17
18 #include "gtest/gtest.h"
19
20 namespace naclmungetest {
21
22 const uint64_t Terminator = 0x5768798008978675LL;
23
24 #define ARRAY(name) name, array_lengthof(name)
25
26 #define ARRAY_TERM(name) ARRAY(name), Terminator
27
28 inline std::string stringify(llvm::NaClMungedBitcode &MungedBitcode) {
29 std::string Buffer;
30 llvm::raw_string_ostream StrBuf(Buffer);
31 MungedBitcode.print(StrBuf);
32 return StrBuf.str();
33 }
34
35 inline std::string stringify(llvm::NaClBitcodeMunger &Munger) {
36 return stringify(Munger.getMungedBitcode());
37 }
38
39 } // end of namespace naclmungetest
40
41 #endif // end LLVM_UNITTEST_BITCODE_NACLMUNGETEST_H
OLDNEW
« no previous file with comments | « unittests/Bitcode/NaClCompressTests.cpp ('k') | unittests/Bitcode/NaClMungeWriteErrorTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698