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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 652227: Allow snapshots built without -DANDROID to work on Android.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 | « src/serialize.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 CHECK_EQ(make_code(UNCLASSIFIED, 2), 124 CHECK_EQ(make_code(UNCLASSIFIED, 2),
125 encoder.Encode(the_hole_value_location.address())); 125 encoder.Encode(the_hole_value_location.address()));
126 ExternalReference stack_limit_address = 126 ExternalReference stack_limit_address =
127 ExternalReference::address_of_stack_limit(); 127 ExternalReference::address_of_stack_limit();
128 CHECK_EQ(make_code(UNCLASSIFIED, 4), 128 CHECK_EQ(make_code(UNCLASSIFIED, 4),
129 encoder.Encode(stack_limit_address.address())); 129 encoder.Encode(stack_limit_address.address()));
130 ExternalReference real_stack_limit_address = 130 ExternalReference real_stack_limit_address =
131 ExternalReference::address_of_real_stack_limit(); 131 ExternalReference::address_of_real_stack_limit();
132 CHECK_EQ(make_code(UNCLASSIFIED, 5), 132 CHECK_EQ(make_code(UNCLASSIFIED, 5),
133 encoder.Encode(real_stack_limit_address.address())); 133 encoder.Encode(real_stack_limit_address.address()));
134 CHECK_EQ(make_code(UNCLASSIFIED, 11), 134 CHECK_EQ(make_code(UNCLASSIFIED, 12),
135 encoder.Encode(ExternalReference::debug_break().address())); 135 encoder.Encode(ExternalReference::debug_break().address()));
136 CHECK_EQ(make_code(UNCLASSIFIED, 7), 136 CHECK_EQ(make_code(UNCLASSIFIED, 7),
137 encoder.Encode(ExternalReference::new_space_start().address())); 137 encoder.Encode(ExternalReference::new_space_start().address()));
138 CHECK_EQ(make_code(UNCLASSIFIED, 3), 138 CHECK_EQ(make_code(UNCLASSIFIED, 3),
139 encoder.Encode(ExternalReference::roots_address().address())); 139 encoder.Encode(ExternalReference::roots_address().address()));
140 } 140 }
141 141
142 142
143 TEST(ExternalReferenceDecoder) { 143 TEST(ExternalReferenceDecoder) {
144 StatsTable::SetCounterFunction(counter_function); 144 StatsTable::SetCounterFunction(counter_function);
(...skipping 13 matching lines...) Expand all
158 decoder.Decode( 158 decoder.Decode(
159 make_code(STATS_COUNTER, 159 make_code(STATS_COUNTER,
160 Counters::k_keyed_load_function_prototype))); 160 Counters::k_keyed_load_function_prototype)));
161 CHECK_EQ(ExternalReference::the_hole_value_location().address(), 161 CHECK_EQ(ExternalReference::the_hole_value_location().address(),
162 decoder.Decode(make_code(UNCLASSIFIED, 2))); 162 decoder.Decode(make_code(UNCLASSIFIED, 2)));
163 CHECK_EQ(ExternalReference::address_of_stack_limit().address(), 163 CHECK_EQ(ExternalReference::address_of_stack_limit().address(),
164 decoder.Decode(make_code(UNCLASSIFIED, 4))); 164 decoder.Decode(make_code(UNCLASSIFIED, 4)));
165 CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(), 165 CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(),
166 decoder.Decode(make_code(UNCLASSIFIED, 5))); 166 decoder.Decode(make_code(UNCLASSIFIED, 5)));
167 CHECK_EQ(ExternalReference::debug_break().address(), 167 CHECK_EQ(ExternalReference::debug_break().address(),
168 decoder.Decode(make_code(UNCLASSIFIED, 11))); 168 decoder.Decode(make_code(UNCLASSIFIED, 12)));
169 CHECK_EQ(ExternalReference::new_space_start().address(), 169 CHECK_EQ(ExternalReference::new_space_start().address(),
170 decoder.Decode(make_code(UNCLASSIFIED, 7))); 170 decoder.Decode(make_code(UNCLASSIFIED, 7)));
171 } 171 }
172 172
173 173
174 class FileByteSink : public SnapshotByteSink { 174 class FileByteSink : public SnapshotByteSink {
175 public: 175 public:
176 explicit FileByteSink(const char* snapshot_file) { 176 explicit FileByteSink(const char* snapshot_file) {
177 fp_ = OS::FOpen(snapshot_file, "wb"); 177 fp_ = OS::FOpen(snapshot_file, "wb");
178 file_name_ = snapshot_file; 178 file_name_ = snapshot_file;
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 TEST(TestThatAlwaysFails) { 561 TEST(TestThatAlwaysFails) {
562 bool ArtificialFailure = false; 562 bool ArtificialFailure = false;
563 CHECK(ArtificialFailure); 563 CHECK(ArtificialFailure);
564 } 564 }
565 565
566 566
567 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 567 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
568 bool ArtificialFailure2 = false; 568 bool ArtificialFailure2 = false;
569 CHECK(ArtificialFailure2); 569 CHECK(ArtificialFailure2);
570 } 570 }
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698