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

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

Issue 1155893003: Add {Map,Set}::FromArray to the API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 7 months 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 | « src/contexts.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 395450d94c00583edba3ddb367fb23e5fecdc088..2bf3620c7502a3a75e8430c0f73ff6bdd0a8a78c 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -21127,6 +21127,9 @@ TEST(Map) {
CHECK_EQ(2, entry->Length());
CHECK_EQ(3, entry->Get(0).As<v8::Int32>()->Value());
CHECK_EQ(4, entry->Get(1).As<v8::Int32>()->Value());
+
+ map = v8::Map::FromArray(env.local(), entries).ToLocalChecked();
+ CHECK_EQ(2, map->Size());
}
@@ -21149,4 +21152,7 @@ TEST(Set) {
CHECK_EQ(2, keys->Length());
CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value());
CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value());
+
+ set = v8::Set::FromArray(env.local(), keys).ToLocalChecked();
+ CHECK_EQ(2, set->Size());
}
« no previous file with comments | « src/contexts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698