Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Unified Diff: test/cctest/test-transitions.cc

Issue 805453002: Introduced PropertyType ACCESSOR_FIELD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698