diff --git a/test/unittests/objects/object-unittest.cc b/test/unittests/objects/object-unittest.cc index e5aea4c682..eb666ebca8 100644 --- a/test/unittests/objects/object-unittest.cc +++ b/test/unittests/objects/object-unittest.cc @@ -57,7 +57,7 @@ TEST(Object, InstanceTypeList) { TEST(Object, InstanceTypeListOrder) { int current = 0; - int last = -1; + int prev = -1; InstanceType current_type = static_cast(current); EXPECT_EQ(current_type, InstanceType::FIRST_TYPE); EXPECT_EQ(current_type, InstanceType::INTERNALIZED_STRING_TYPE); @@ -65,12 +65,12 @@ TEST(Object, InstanceTypeListOrder) { current_type = InstanceType::type; \ current = static_cast(current_type); \ if (current > static_cast(LAST_NAME_TYPE)) { \ - EXPECT_LE(last + 1, current); \ + EXPECT_LE(prev + 1, current); \ } \ - EXPECT_LT(last, current) << " INSTANCE_TYPE_LIST is not ordered: " \ - << "last = " << static_cast(last) \ + EXPECT_LT(prev, current) << " INSTANCE_TYPE_LIST is not ordered: " \ + << "last = " << static_cast(prev) \ << " vs. current = " << current_type; \ - last = current; + prev = current; // Only test hand-written portion of instance type list. The generated portion // doesn't run the same risk of getting out of order, and it does emit type @@ -83,17 +83,17 @@ TEST(Object, InstanceTypeListOrder) { TEST(Object, StructListOrder) { int current = static_cast(InstanceType::FIRST_STRUCT_TYPE); - int last = current - 1; - ASSERT_LT(0, last); + int prev = current - 1; + ASSERT_LT(0, prev); InstanceType current_type = static_cast(current); #define TEST_STRUCT(TYPE, class, name) \ current_type = InstanceType::TYPE; \ current = static_cast(current_type); \ - EXPECT_LE(last + 1, current) \ + EXPECT_LE(prev + 1, current) \ << " STRUCT_LIST is not ordered: " \ - << " last = " << static_cast(last) \ + << " last = " << static_cast(prev) \ << " vs. current = " << current_type; \ - last = current; + prev = current; // Only test the _BASE portion (the hand-coded part). Note that the values are // not necessarily consecutive because some Structs that need special