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

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

Issue 118553003: Upgrade Symbol implementation to match current ES6 behavior. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Remove uninteresting equality test Created 6 years, 11 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
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 38c8ac78bc52eb577b675d1877b6c46445d81327..db190d554c9d188d99e92b98a0024a610bb0fefa 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2787,7 +2787,13 @@ THREADED_TEST(SymbolProperties) {
CHECK(sym_obj->IsSymbolObject());
CHECK(!sym2->IsSymbolObject());
CHECK(!obj->IsSymbolObject());
- CHECK(sym_obj->Equals(sym2));
+ // Comparing Symbol wrapper with Symbol will throw when
+ // ToPrimitive() is attempted performed on the wrapper.
+ {
+ v8::TryCatch try_catch;
+ sym_obj->Equals(sym2);
+ CHECK(try_catch.HasCaught());
+ }
CHECK(!sym_obj->StrictEquals(sym2));
CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj));
CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2));

Powered by Google App Engine
This is Rietveld 408576698