From 81c59c5c0c781c7a38ddec2fc874710e572cc391 Mon Sep 17 00:00:00 2001 From: "kasperl@chromium.org" Date: Thu, 4 Mar 2010 12:35:39 +0000 Subject: [PATCH] Don't use strcmp to test heap object pointer equality. Review URL: http://codereview.chromium.org/668060 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/cctest/test-serialize.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc index dae025e..4464d05 100644 --- a/test/cctest/test-serialize.cc +++ b/test/cctest/test-serialize.cc @@ -481,8 +481,8 @@ TEST(LinearAllocation) { i += kSmallFixedArraySize) { Object* obj = Heap::AllocateFixedArray(kSmallFixedArrayLength); if (new_last != NULL) { - CHECK_EQ(reinterpret_cast(obj), - reinterpret_cast(new_last) + kSmallFixedArraySize); + CHECK(reinterpret_cast(obj) == + reinterpret_cast(new_last) + kSmallFixedArraySize); } new_last = obj; } @@ -500,8 +500,8 @@ TEST(LinearAllocation) { pointer_last = NULL; } if (pointer_last != NULL) { - CHECK_EQ(reinterpret_cast(obj), - reinterpret_cast(pointer_last) + kSmallFixedArraySize); + CHECK(reinterpret_cast(obj) == + reinterpret_cast(pointer_last) + kSmallFixedArraySize); } pointer_last = obj; } @@ -517,8 +517,8 @@ TEST(LinearAllocation) { data_last = NULL; } if (data_last != NULL) { - CHECK_EQ(reinterpret_cast(obj), - reinterpret_cast(data_last) + kSmallStringSize); + CHECK(reinterpret_cast(obj) == + reinterpret_cast(data_last) + kSmallStringSize); } data_last = obj; } @@ -534,8 +534,8 @@ TEST(LinearAllocation) { map_last = NULL; } if (map_last != NULL) { - CHECK_EQ(reinterpret_cast(obj), - reinterpret_cast(map_last) + kMapSize); + CHECK(reinterpret_cast(obj) == + reinterpret_cast(map_last) + kMapSize); } map_last = obj; } -- 2.7.4