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

Unified Diff: runtime/vm/hash_table_test.cc

Issue 428273002: Handle-like interface for HashTable. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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
===================================================================
--- runtime/vm/hash_table_test.cc (revision 38793)
+++ runtime/vm/hash_table_test.cc (working copy)
@@ -60,7 +60,7 @@
TEST_CASE(HashTable) {
typedef HashTable<TestTraits, 2, 1> Table;
- Table table(Array::Handle(HashTables::New<Table>(5)));
+ Table table(HashTables::New<Table>(5));
// Ensure that we did get at least 5 entries.
EXPECT_LE(5, table.NumEntries());
EXPECT_EQ(0, table.NumOccupied());
@@ -121,7 +121,7 @@
TEST_CASE(EnumIndexHashMap) {
typedef EnumIndexHashMap<TestTraits> Table;
- Table table(Array::Handle(HashTables::New<Table>(5)));
+ Table table(HashTables::New<Table>(5));
table.UpdateOrInsert(String::Handle(String::New("a")),
String::Handle(String::New("A")));
EXPECT(table.ContainsKey("a"));
@@ -228,7 +228,7 @@
template<typename Set>
void TestSet(intptr_t initial_capacity, bool ordered) {
std::set<std::string> expected;
- Set actual(Array::Handle(HashTables::New<Set>(initial_capacity)));
+ Set actual(HashTables::New<Set>(initial_capacity));
// Insert the following strings twice:
// aaa...aaa (length 26)
// bbb..bbb
@@ -253,7 +253,7 @@
template<typename Map>
void TestMap(intptr_t initial_capacity, bool ordered) {
std::map<std::string, int> expected;
- Map actual(Array::Handle(HashTables::New<Map>(initial_capacity)));
+ Map actual(HashTables::New<Map>(initial_capacity));
// Insert the following (strings, int) mapping:
// aaa...aaa -> 26
// bbb..bbb -> 25
« 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