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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 static void Deserialize() { | 288 static void Deserialize() { |
289 CHECK(Snapshot::Initialize(FLAG_testing_serialization_file)); | 289 CHECK(Snapshot::Initialize(FLAG_testing_serialization_file)); |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 static void SanityCheck() { | 293 static void SanityCheck() { |
294 Isolate* isolate = CcTest::i_isolate(); | 294 Isolate* isolate = CcTest::i_isolate(); |
295 v8::HandleScope scope(CcTest::isolate()); | 295 v8::HandleScope scope(CcTest::isolate()); |
296 #ifdef VERIFY_HEAP | 296 #ifdef VERIFY_HEAP |
297 HEAP->Verify(); | 297 CcTest::heap()->Verify(); |
298 #endif | 298 #endif |
299 CHECK(isolate->global_object()->IsJSObject()); | 299 CHECK(isolate->global_object()->IsJSObject()); |
300 CHECK(isolate->native_context()->IsContext()); | 300 CHECK(isolate->native_context()->IsContext()); |
301 CHECK(HEAP->string_table()->IsStringTable()); | 301 CHECK(CcTest::heap()->string_table()->IsStringTable()); |
302 CHECK(!isolate->factory()->InternalizeOneByteString( | 302 CHECK(!isolate->factory()->InternalizeOneByteString( |
303 STATIC_ASCII_VECTOR("Empty"))->IsFailure()); | 303 STATIC_ASCII_VECTOR("Empty"))->IsFailure()); |
304 } | 304 } |
305 | 305 |
306 | 306 |
307 DEPENDENT_TEST(Deserialize, Serialize) { | 307 DEPENDENT_TEST(Deserialize, Serialize) { |
308 // The serialize-deserialize tests only work if the VM is built without | 308 // The serialize-deserialize tests only work if the VM is built without |
309 // serialization. That doesn't matter. We don't need to be able to | 309 // serialization. That doesn't matter. We don't need to be able to |
310 // serialize a snapshot in a VM that is booted from a snapshot. | 310 // serialize a snapshot in a VM that is booted from a snapshot. |
311 if (!Snapshot::HaveASnapshotToStartFrom()) { | 311 if (!Snapshot::HaveASnapshotToStartFrom()) { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 TEST(TestThatAlwaysFails) { | 640 TEST(TestThatAlwaysFails) { |
641 bool ArtificialFailure = false; | 641 bool ArtificialFailure = false; |
642 CHECK(ArtificialFailure); | 642 CHECK(ArtificialFailure); |
643 } | 643 } |
644 | 644 |
645 | 645 |
646 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 646 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
647 bool ArtificialFailure2 = false; | 647 bool ArtificialFailure2 = false; |
648 CHECK(ArtificialFailure2); | 648 CHECK(ArtificialFailure2); |
649 } | 649 } |
OLD | NEW |