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

Side by Side Diff: courgette/encoded_program_unittest.cc

Issue 149597: Code changes to get the code to compile under GCC.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « courgette/encoded_program_fuzz_unittest.cc ('k') | courgette/ensemble_apply.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "courgette/encoded_program.h" 5 #include "courgette/encoded_program.h"
6 6
7 #include "courgette/streams.h" 7 #include "courgette/streams.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 TEST(EncodedProgramTest, Test) { 10 TEST(EncodedProgramTest, Test) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 EXPECT_TRUE(can_read); 46 EXPECT_TRUE(can_read);
47 47
48 // Finally, try to assemble. 48 // Finally, try to assemble.
49 courgette::SinkStream assembled; 49 courgette::SinkStream assembled;
50 bool can_assemble = encoded2->AssembleTo(&assembled); 50 bool can_assemble = encoded2->AssembleTo(&assembled);
51 EXPECT_TRUE(can_assemble); 51 EXPECT_TRUE(can_assemble);
52 52
53 const void* assembled_buffer = assembled.Buffer(); 53 const void* assembled_buffer = assembled.Buffer();
54 size_t assembled_length = assembled.Length(); 54 size_t assembled_length = assembled.Length();
55 55
56 EXPECT_EQ(8, assembled_length); 56 EXPECT_EQ(8U, assembled_length);
57 57
58 static const uint8 golden[] = { 58 static const uint8 golden[] = {
59 0x04, 0x00, 0x90, 0x00, // ABS32 to base + 4 59 0x04, 0x00, 0x90, 0x00, // ABS32 to base + 4
60 0xF8, 0xFF, 0xFF, 0xFF // REL32 from next line to base + 2 60 0xF8, 0xFF, 0xFF, 0xFF // REL32 from next line to base + 2
61 }; 61 };
62 62
63 EXPECT_EQ(0, memcmp(assembled_buffer, golden, 8)); 63 EXPECT_EQ(0, memcmp(assembled_buffer, golden, 8));
64 } 64 }
OLDNEW
« no previous file with comments | « courgette/encoded_program_fuzz_unittest.cc ('k') | courgette/ensemble_apply.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698