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

Side by Side 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: Some test improvements. Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/symbol.js ('k') | test/mjsunit/harmony/private.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after
2780 v8::Local<v8::Value> sym_val = sym2; 2780 v8::Local<v8::Value> sym_val = sym2;
2781 CHECK(sym_val->IsSymbol()); 2781 CHECK(sym_val->IsSymbol());
2782 CHECK(sym_val->Equals(sym2)); 2782 CHECK(sym_val->Equals(sym2));
2783 CHECK(sym_val->StrictEquals(sym2)); 2783 CHECK(sym_val->StrictEquals(sym2));
2784 CHECK(v8::Symbol::Cast(*sym_val)->Equals(sym2)); 2784 CHECK(v8::Symbol::Cast(*sym_val)->Equals(sym2));
2785 2785
2786 v8::Local<v8::Value> sym_obj = v8::SymbolObject::New(isolate, sym2); 2786 v8::Local<v8::Value> sym_obj = v8::SymbolObject::New(isolate, sym2);
2787 CHECK(sym_obj->IsSymbolObject()); 2787 CHECK(sym_obj->IsSymbolObject());
2788 CHECK(!sym2->IsSymbolObject()); 2788 CHECK(!sym2->IsSymbolObject());
2789 CHECK(!obj->IsSymbolObject()); 2789 CHECK(!obj->IsSymbolObject());
2790 CHECK(sym_obj->Equals(sym2)); 2790 CHECK(!sym_obj->Equals(sym2));
2791 CHECK(!sym_obj->StrictEquals(sym2)); 2791 CHECK(!sym_obj->StrictEquals(sym2));
2792 CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj)); 2792 CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj));
2793 CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2)); 2793 CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2));
2794 2794
2795 // Make sure delete of a non-existent symbol property works. 2795 // Make sure delete of a non-existent symbol property works.
2796 CHECK(obj->Delete(sym1)); 2796 CHECK(obj->Delete(sym1));
2797 CHECK(!obj->Has(sym1)); 2797 CHECK(!obj->Has(sym1));
2798 2798
2799 CHECK(obj->Set(sym1, v8::Integer::New(isolate, 1503))); 2799 CHECK(obj->Set(sym1, v8::Integer::New(isolate, 1503)));
2800 CHECK(obj->Has(sym1)); 2800 CHECK(obj->Has(sym1));
(...skipping 19176 matching lines...) Expand 10 before | Expand all | Expand 10 after
21977 21977
21978 21978
21979 TEST(TestFunctionCallOptimization) { 21979 TEST(TestFunctionCallOptimization) {
21980 i::FLAG_allow_natives_syntax = true; 21980 i::FLAG_allow_natives_syntax = true;
21981 ApiCallOptimizationChecker checker; 21981 ApiCallOptimizationChecker checker;
21982 checker.Run(true, true); 21982 checker.Run(true, true);
21983 checker.Run(false, true); 21983 checker.Run(false, true);
21984 checker.Run(true, false); 21984 checker.Run(true, false);
21985 checker.Run(false, false); 21985 checker.Run(false, false);
21986 } 21986 }
OLDNEW
« no previous file with comments | « src/symbol.js ('k') | test/mjsunit/harmony/private.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698