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

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

Issue 630773002: Test C++11 features on *all* platforms. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 collector.StartSequence(); 215 collector.StartSequence();
216 collector.Add('0'); 216 collector.Add('0');
217 collector.AddBlock( 217 collector.AddBlock(
218 i::Vector<const char>("12345678901234567890123456789012", 32)); 218 i::Vector<const char>("12345678901234567890123456789012", 32));
219 i::Vector<char> seq = collector.EndSequence(); 219 i::Vector<char> seq = collector.EndSequence();
220 CHECK_EQ(0, strncmp("0123456789012345678901234567890123", 220 CHECK_EQ(0, strncmp("0123456789012345678901234567890123",
221 seq.start(), seq.length())); 221 seq.start(), seq.length()));
222 } 222 }
223 223
224 224
225 // TODO(svenpanne) Unconditionally test this when our infrastructure is fixed.
226 #if !V8_OS_NACL
227 TEST(CPlusPlus11Features) { 225 TEST(CPlusPlus11Features) {
228 struct S { 226 struct S {
229 bool x; 227 bool x;
230 struct T { 228 struct T {
231 double y; 229 double y;
232 int z[3]; 230 int z[3];
233 } t; 231 } t;
234 }; 232 };
235 S s{true, {3.1415, {1, 2, 3}}}; 233 S s{true, {3.1415, {1, 2, 3}}};
236 CHECK_EQ(2, s.t.z[1]); 234 CHECK_EQ(2, s.t.z[1]);
(...skipping 12 matching lines...) Expand all
249 vec.push_back(66); 247 vec.push_back(66);
250 for (auto& i : vec) { 248 for (auto& i : vec) {
251 ++i; 249 ++i;
252 } 250 }
253 int j = 12; 251 int j = 12;
254 for (auto i : vec) { 252 for (auto i : vec) {
255 CHECK_EQ(j, i); 253 CHECK_EQ(j, i);
256 j += 11; 254 j += 11;
257 } 255 }
258 } 256 }
259 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698