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

Unified Diff: unittests/Bitcode/NaClBitstreamReaderTest.cpp

Issue 1122423005: Add (unsupported experimental) feature allowing byte aligned bitcode. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix nits. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/NaCl/Bitcode/pnacl-bcdis/no-abbreviations.ll ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unittests/Bitcode/NaClBitstreamReaderTest.cpp
diff --git a/unittests/Bitcode/NaClBitstreamReaderTest.cpp b/unittests/Bitcode/NaClBitstreamReaderTest.cpp
index a2a275a57dd785f88b5869a906f465d9ac7f7461..aba127d9a57c7f9cf613c036209e76e01bea50cb 100644
--- a/unittests/Bitcode/NaClBitstreamReaderTest.cpp
+++ b/unittests/Bitcode/NaClBitstreamReaderTest.cpp
@@ -39,23 +39,13 @@ TEST(NaClBitstreamTest, DefaultCursorAtBitZero) {
EXPECT_EQ(BitZero, Cursor->GetCurrentBitNo());
}
-// Tests that when we initialize the bitstream cursor with a default bitstream
-// reader, the cursor is at bit zero.
-TEST(NaClBitstreamTest, CursorOnDefaultReaderAtBitZero) {
- NaClBitstreamReader Reader;
- uint8_t CursorMemory[sizeof(NaClBitstreamCursor)];
- NaClBitstreamCursor *Cursor =
- new (InitAltOnes(CursorMemory, sizeof(NaClBitstreamCursor)))
- NaClBitstreamCursor(Reader);
- EXPECT_EQ(BitZero, Cursor->GetCurrentBitNo());
-}
-
// Tests that when we initialize the bitstream cursor with an array-filled
// bitstream reader, the cursor is at bit zero.
TEST(NaClBitstreamTest, ReaderCursorAtBitZero) {
static const size_t BufferSize = 12;
unsigned char Buffer[BufferSize];
- NaClBitstreamReader Reader(Buffer, Buffer+BufferSize);
+ NaClBitstreamReader Reader(
+ getNonStreamedMemoryObject(Buffer, Buffer+BufferSize), 0);
uint8_t CursorMemory[sizeof(NaClBitstreamCursor)];
NaClBitstreamCursor *Cursor =
new (InitAltOnes(CursorMemory, sizeof(NaClBitstreamCursor)))
@@ -67,7 +57,8 @@ TEST(NaClBitstreamTest, CursorAtReaderInitialAddress) {
static const size_t BufferSize = 12;
static const size_t InitialAddress = 8;
unsigned char Buffer[BufferSize];
- NaClBitstreamReader Reader(Buffer, Buffer+BufferSize, InitialAddress);
+ NaClBitstreamReader Reader(
+ getNonStreamedMemoryObject(Buffer, Buffer+BufferSize), InitialAddress);
uint8_t CursorMemory[sizeof(NaClBitstreamCursor)];
NaClBitstreamCursor *Cursor =
new (InitAltOnes(CursorMemory, sizeof(NaClBitstreamCursor)))
« no previous file with comments | « test/NaCl/Bitcode/pnacl-bcdis/no-abbreviations.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698