OLD | NEW |
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 //---------------------------------------------------------------------------- | 278 //---------------------------------------------------------------------------- |
279 // Tests that the heap can be deserialized. | 279 // Tests that the heap can be deserialized. |
280 | 280 |
281 static void Deserialize() { | 281 static void Deserialize() { |
282 CHECK(Snapshot::Initialize(FLAG_testing_serialization_file)); | 282 CHECK(Snapshot::Initialize(FLAG_testing_serialization_file)); |
283 } | 283 } |
284 | 284 |
285 | 285 |
286 static void SanityCheck() { | 286 static void SanityCheck() { |
287 v8::HandleScope scope; | 287 v8::HandleScope scope; |
288 #ifdef DEBUG | 288 #ifdef VERIFY_HEAP |
289 HEAP->Verify(); | 289 HEAP->Verify(); |
290 #endif | 290 #endif |
291 CHECK(Isolate::Current()->global_object()->IsJSObject()); | 291 CHECK(Isolate::Current()->global_object()->IsJSObject()); |
292 CHECK(Isolate::Current()->native_context()->IsContext()); | 292 CHECK(Isolate::Current()->native_context()->IsContext()); |
293 CHECK(HEAP->symbol_table()->IsSymbolTable()); | 293 CHECK(HEAP->symbol_table()->IsSymbolTable()); |
294 CHECK(!FACTORY->LookupAsciiSymbol("Empty")->IsFailure()); | 294 CHECK(!FACTORY->LookupAsciiSymbol("Empty")->IsFailure()); |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 DEPENDENT_TEST(Deserialize, Serialize) { | 298 DEPENDENT_TEST(Deserialize, Serialize) { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 TEST(TestThatAlwaysFails) { | 592 TEST(TestThatAlwaysFails) { |
593 bool ArtificialFailure = false; | 593 bool ArtificialFailure = false; |
594 CHECK(ArtificialFailure); | 594 CHECK(ArtificialFailure); |
595 } | 595 } |
596 | 596 |
597 | 597 |
598 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 598 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
599 bool ArtificialFailure2 = false; | 599 bool ArtificialFailure2 = false; |
600 CHECK(ArtificialFailure2); | 600 CHECK(ArtificialFailure2); |
601 } | 601 } |
OLD | NEW |