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

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

Issue 543087: Fix build problems. (Closed)
Patch Set: Created 10 years, 11 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 | « no previous file | test/mjsunit/regress/regress-crbug-3184.js » ('j') | 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 DEPENDENT_TEST(PartialDeserialization, PartialSerialization) { 358 DEPENDENT_TEST(PartialDeserialization, PartialSerialization) {
359 v8::V8::Initialize(); 359 v8::V8::Initialize();
360 const char* file_name = FLAG_testing_serialization_file; 360 const char* file_name = FLAG_testing_serialization_file;
361 int file_name_length = strlen(file_name) + 10; 361 int file_name_length = strlen(file_name) + 10;
362 Vector<char> name = Vector<char>::New(file_name_length + 1); 362 Vector<char> name = Vector<char>::New(file_name_length + 1);
363 OS::SNPrintF(name, "%s.size", file_name); 363 OS::SNPrintF(name, "%s.size", file_name);
364 FILE* fp = OS::FOpen(name.start(), "ra"); 364 FILE* fp = OS::FOpen(name.start(), "ra");
365 int new_size, pointer_size, data_size, code_size, map_size, cell_size; 365 int new_size, pointer_size, data_size, code_size, map_size, cell_size;
366 int large_size; 366 int large_size;
367 #ifdef _MSC_VER
Erik Corry 2010/01/15 20:14:10 Can you add here a comment saying // Avoid warning
368 // Please note that this is only fine if %c and %s are not being used.
369 #define fscanf fscanf_s
370 #endif
367 CHECK_EQ(1, fscanf(fp, "new %d\n", &new_size)); 371 CHECK_EQ(1, fscanf(fp, "new %d\n", &new_size));
368 CHECK_EQ(1, fscanf(fp, "pointer %d\n", &pointer_size)); 372 CHECK_EQ(1, fscanf(fp, "pointer %d\n", &pointer_size));
369 CHECK_EQ(1, fscanf(fp, "data %d\n", &data_size)); 373 CHECK_EQ(1, fscanf(fp, "data %d\n", &data_size));
370 CHECK_EQ(1, fscanf(fp, "code %d\n", &code_size)); 374 CHECK_EQ(1, fscanf(fp, "code %d\n", &code_size));
371 CHECK_EQ(1, fscanf(fp, "map %d\n", &map_size)); 375 CHECK_EQ(1, fscanf(fp, "map %d\n", &map_size));
372 CHECK_EQ(1, fscanf(fp, "cell %d\n", &cell_size)); 376 CHECK_EQ(1, fscanf(fp, "cell %d\n", &cell_size));
373 CHECK_EQ(1, fscanf(fp, "large %d\n", &large_size)); 377 CHECK_EQ(1, fscanf(fp, "large %d\n", &large_size));
378 #ifdef _MSC_VER
379 #undef fscanf
380 #endif
374 fclose(fp); 381 fclose(fp);
375 Heap::ReserveSpace(new_size, 382 Heap::ReserveSpace(new_size,
376 pointer_size, 383 pointer_size,
377 data_size, 384 data_size,
378 code_size, 385 code_size,
379 map_size, 386 map_size,
380 cell_size, 387 cell_size,
381 large_size); 388 large_size);
382 int snapshot_size = 0; 389 int snapshot_size = 0;
383 byte* snapshot = ReadBytes(file_name, &snapshot_size); 390 byte* snapshot = ReadBytes(file_name, &snapshot_size);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 TEST(TestThatAlwaysFails) { 504 TEST(TestThatAlwaysFails) {
498 bool ArtificialFailure = false; 505 bool ArtificialFailure = false;
499 CHECK(ArtificialFailure); 506 CHECK(ArtificialFailure);
500 } 507 }
501 508
502 509
503 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 510 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
504 bool ArtificialFailure2 = false; 511 bool ArtificialFailure2 = false;
505 CHECK(ArtificialFailure2); 512 CHECK(ArtificialFailure2);
506 } 513 }
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-3184.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698