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

Unified Diff: runtime/vm/hash_table_test.cc

Issue 2083103002: Remove some uses of STL map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « runtime/vm/hash_table.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/hash_table_test.cc
diff --git a/runtime/vm/hash_table_test.cc b/runtime/vm/hash_table_test.cc
index 158af48ab55e08e88c7ff32bff74ffa2a7eb2155..2d597b1068aad6bb102d57ce673a733a973a183e 100644
--- a/runtime/vm/hash_table_test.cc
+++ b/runtime/vm/hash_table_test.cc
@@ -122,34 +122,6 @@ TEST_CASE(HashTable) {
}
-TEST_CASE(EnumIndexHashMap) {
- typedef EnumIndexHashMap<TestTraits> Table;
- Table table(HashTables::New<Table>(5));
- table.UpdateOrInsert(String::Handle(String::New("a")),
- String::Handle(String::New("A")));
- EXPECT(table.ContainsKey("a"));
- table.UpdateValue("a", String::Handle(String::New("AAA")));
- String& a_value = String::Handle();
- a_value ^= table.GetOrNull("a");
- EXPECT(a_value.Equals("AAA"));
- Object& null_value = Object::Handle(table.GetOrNull("0"));
- EXPECT(null_value.IsNull());
-
- // Test on-demand allocation of a new key object using NewKey in traits.
- String& b_value = String::Handle();
- b_value ^=
- table.InsertNewOrGetValue("b", String::Handle(String::New("BBB")));
- EXPECT(b_value.Equals("BBB"));
- {
- // When the key is already present, there should be no allocation.
- NoSafepointScope no_safepoint;
- b_value ^= table.InsertNewOrGetValue("b", a_value);
- EXPECT(b_value.Equals("BBB"));
- }
- table.Release();
-}
-
-
std::string ToStdString(const String& str) {
EXPECT(str.IsOneByteString());
std::string result;
@@ -290,7 +262,6 @@ TEST_CASE(Sets) {
initial_capacity < 32;
++initial_capacity) {
TestSet<UnorderedHashSet<TestTraits> >(initial_capacity, false);
- TestSet<EnumIndexHashSet<TestTraits> >(initial_capacity, true);
}
}
@@ -300,7 +271,6 @@ TEST_CASE(Maps) {
initial_capacity < 32;
++initial_capacity) {
TestMap<UnorderedHashMap<TestTraits> >(initial_capacity, false);
- TestMap<EnumIndexHashMap<TestTraits> >(initial_capacity, true);
}
}
« no previous file with comments | « runtime/vm/hash_table.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698