Chromium Code Reviews| Index: test/cctest/test-heap.cc |
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
| index 4e924215b958c5fac318f232f457d2a9fc0e04b5..452b31f0033224da0174667334f34a8e3316f323 100644 |
| --- a/test/cctest/test-heap.cc |
| +++ b/test/cctest/test-heap.cc |
| @@ -36,34 +36,43 @@ TEST(HeapMaps) { |
| InitializeVM(); |
| CheckMap(Heap::meta_map(), MAP_TYPE, Map::kSize); |
| CheckMap(Heap::heap_number_map(), HEAP_NUMBER_TYPE, HeapNumber::kSize); |
| - CheckMap(Heap::fixed_array_map(), FIXED_ARRAY_TYPE, Array::kHeaderSize); |
| + CheckMap(Heap::fixed_array_map(), FIXED_ARRAY_TYPE, Array::kAlignedSize); |
| CheckMap(Heap::long_string_map(), LONG_STRING_TYPE, |
| - SeqTwoByteString::kHeaderSize); |
| + SeqTwoByteString::kAlignedSize); |
| } |
| static void CheckOddball(Object* obj, const char* string) { |
| CHECK(obj->IsOddball()); |
| +#ifndef V8_HOST_ARCH_64_BIT |
| +// TODO(X64): Reenable when native builtins work. |
| bool exc; |
| Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc); |
| CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string))); |
| +#endif // V8_HOST_ARCH_64_BIT |
| } |
| static void CheckSmi(int value, const char* string) { |
| +#ifndef V8_HOST_ARCH_64_BIT |
| +// TODO(X64): Reenable when native builtins work. |
| bool exc; |
| Object* print_string = |
| *Execution::ToString(Handle<Object>(Smi::FromInt(value)), &exc); |
| CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string))); |
| +#endif // V8_HOST_ARCH_64_BIT |
| } |
| static void CheckNumber(double value, const char* string) { |
| Object* obj = Heap::NumberFromDouble(value); |
| CHECK(obj->IsNumber()); |
| +#ifndef V8_HOST_ARCH_64_BIT |
| +// TODO(X64): Reenable when native builtins work. |
| bool exc; |
| Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc); |
| CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string))); |
| +#endif // V8_HOST_ARCH_64_BIT |
| } |
| @@ -178,12 +187,16 @@ TEST(HeapObjects) { |
| TEST(Tagging) { |
| InitializeVM(); |
| + int request = 24; |
| + ASSERT_EQ(request, OBJECT_SIZE_ALIGN(request)); |
|
William Hesse
2009/05/22 12:21:13
Shouldn't this be CHECK_EQ? Otherwise, you could
Lasse Reichstein
2009/05/22 13:10:10
I couldn't decide. It's not a check in the same se
|
| CHECK(Smi::FromInt(42)->IsSmi()); |
| - CHECK(Failure::RetryAfterGC(12, NEW_SPACE)->IsFailure()); |
| - CHECK_EQ(12, Failure::RetryAfterGC(12, NEW_SPACE)->requested()); |
| - CHECK_EQ(NEW_SPACE, Failure::RetryAfterGC(12, NEW_SPACE)->allocation_space()); |
| + CHECK(Failure::RetryAfterGC(request, NEW_SPACE)->IsFailure()); |
| + CHECK_EQ(request, Failure::RetryAfterGC(request, NEW_SPACE)->requested()); |
| + CHECK_EQ(NEW_SPACE, |
| + Failure::RetryAfterGC(request, NEW_SPACE)->allocation_space()); |
| CHECK_EQ(OLD_POINTER_SPACE, |
| - Failure::RetryAfterGC(12, OLD_POINTER_SPACE)->allocation_space()); |
| + Failure::RetryAfterGC(request, |
| + OLD_POINTER_SPACE)->allocation_space()); |
| CHECK(Failure::Exception()->IsFailure()); |
| CHECK(Smi::FromInt(Smi::kMinValue)->IsSmi()); |
| CHECK(Smi::FromInt(Smi::kMaxValue)->IsSmi()); |