Index: test/cctest/test-transitions.cc |
diff --git a/test/cctest/test-transitions.cc b/test/cctest/test-transitions.cc |
index 981461326c3ccee9e1c7505eeec8ebc682f08458..6bcdb35e7ecd84cd58b90ff007008503325ae855 100644 |
--- a/test/cctest/test-transitions.cc |
+++ b/test/cctest/test-transitions.cc |
@@ -30,6 +30,24 @@ static void ConnectTransition(Handle<Map> parent, |
} |
+static void CheckPropertyDetailsFieldsConsistency(PropertyType type, |
+ PropertyKind kind, |
+ PropertyLocation location) { |
+ int type_value = PropertyDetails::TypeField::encode(type); |
+ int kind_location_value = PropertyDetails::KindField::encode(kind) | |
+ PropertyDetails::LocationField::encode(location); |
+ CHECK_EQ(type_value, kind_location_value); |
+} |
+ |
+ |
+TEST(PropertyDetailsFieldsConsistency) { |
+ CheckPropertyDetailsFieldsConsistency(FIELD, DATA, IN_OBJECT); |
+ CheckPropertyDetailsFieldsConsistency(CONSTANT, DATA, IN_DESCRIPTOR); |
+ CheckPropertyDetailsFieldsConsistency(ACCESSOR_FIELD, ACCESSOR, IN_OBJECT); |
+ CheckPropertyDetailsFieldsConsistency(CALLBACKS, ACCESSOR, IN_DESCRIPTOR); |
+} |
+ |
+ |
TEST(TransitionArray_SimpleFieldTransitions) { |
CcTest::InitializeVM(); |
v8::HandleScope scope(CcTest::isolate()); |