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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 2980043002: Cleanup unused Dart API Dart_IdentityHash (Closed)
Patch Set: Created 3 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/dart_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 13142c8987a897c02f32452d27131a7f65216f87..bb277eeac3d4515cb730e9eece2ad20c3178dd3e 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -659,46 +659,6 @@ TEST_CASE(IdentityEquals) {
}
}
-TEST_CASE(IdentityHash) {
- Dart_Handle five = Dart_NewInteger(5);
- Dart_Handle five_again = Dart_NewInteger(5);
- Dart_Handle mint = Dart_NewInteger(0xFFFFFFFF);
- Dart_Handle mint_again = Dart_NewInteger(0xFFFFFFFF);
- Dart_Handle abc = NewString("abc");
- // Dart_Handle abc_again = NewString("abc");
- Dart_Handle xyz = NewString("xyz");
- Dart_Handle dart_core = NewString("dart:core");
- Dart_Handle dart_mirrors = NewString("dart:mirrors");
-
- // Same objects.
- EXPECT_EQ(Dart_IdentityHash(five), Dart_IdentityHash(five));
- EXPECT_EQ(Dart_IdentityHash(mint), Dart_IdentityHash(mint));
- EXPECT_EQ(Dart_IdentityHash(abc), Dart_IdentityHash(abc));
- EXPECT_EQ(Dart_IdentityHash(xyz), Dart_IdentityHash(xyz));
-
- // Equal objects with special spec rules.
- EXPECT_EQ(Dart_IdentityHash(five), Dart_IdentityHash(five_again));
- EXPECT_EQ(Dart_IdentityHash(mint), Dart_IdentityHash(mint_again));
-
- // Note abc and abc_again are not required to have equal identity hashes.
-
- // Case where identical() is not the same as pointer equality.
- Dart_Handle nan1 = Dart_NewDouble(NAN);
- Dart_Handle nan2 = Dart_NewDouble(NAN);
- EXPECT_EQ(Dart_IdentityHash(nan1), Dart_IdentityHash(nan2));
-
- // Non-instance objects.
- {
- CHECK_API_SCOPE(thread);
- HANDLESCOPE(thread);
- Dart_Handle lib1 = Dart_LookupLibrary(dart_core);
- Dart_Handle lib2 = Dart_LookupLibrary(dart_mirrors);
-
- EXPECT_EQ(Dart_IdentityHash(lib1), Dart_IdentityHash(lib1));
- EXPECT_EQ(Dart_IdentityHash(lib2), Dart_IdentityHash(lib2));
- }
-}
-
TEST_CASE(ObjectEquals) {
bool equal = false;
Dart_Handle five = NewString("5");
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698