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

Side by Side Diff: test/cctest/test-api.cc

Issue 1421413002: Update to ES2015 == semantics for Symbol/SIMD wrappers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make ordering closer to other clauses Created 5 years, 1 month 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/objects.cc ('k') | test/mjsunit/double-equals.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 2348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 v8::Local<v8::Value> sym_val = sym2; 2359 v8::Local<v8::Value> sym_val = sym2;
2360 CHECK(sym_val->IsSymbol()); 2360 CHECK(sym_val->IsSymbol());
2361 CHECK(sym_val->Equals(sym2)); 2361 CHECK(sym_val->Equals(sym2));
2362 CHECK(sym_val->StrictEquals(sym2)); 2362 CHECK(sym_val->StrictEquals(sym2));
2363 CHECK(v8::Symbol::Cast(*sym_val)->Equals(sym2)); 2363 CHECK(v8::Symbol::Cast(*sym_val)->Equals(sym2));
2364 2364
2365 v8::Local<v8::Value> sym_obj = v8::SymbolObject::New(isolate, sym2); 2365 v8::Local<v8::Value> sym_obj = v8::SymbolObject::New(isolate, sym2);
2366 CHECK(sym_obj->IsSymbolObject()); 2366 CHECK(sym_obj->IsSymbolObject());
2367 CHECK(!sym2->IsSymbolObject()); 2367 CHECK(!sym2->IsSymbolObject());
2368 CHECK(!obj->IsSymbolObject()); 2368 CHECK(!obj->IsSymbolObject());
2369 CHECK(!sym_obj->Equals(sym2)); 2369 CHECK(sym_obj->Equals(sym2));
2370 CHECK(!sym_obj->StrictEquals(sym2)); 2370 CHECK(!sym_obj->StrictEquals(sym2));
2371 CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj)); 2371 CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj));
2372 CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2)); 2372 CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2));
2373 2373
2374 // Make sure delete of a non-existent symbol property works. 2374 // Make sure delete of a non-existent symbol property works.
2375 CHECK(obj->Delete(sym1)); 2375 CHECK(obj->Delete(sym1));
2376 CHECK(!obj->Has(sym1)); 2376 CHECK(!obj->Has(sym1));
2377 2377
2378 CHECK(obj->Set(sym1, v8::Integer::New(isolate, 1503))); 2378 CHECK(obj->Set(sym1, v8::Integer::New(isolate, 1503)));
2379 CHECK(obj->Has(sym1)); 2379 CHECK(obj->Has(sym1));
(...skipping 19602 matching lines...) Expand 10 before | Expand all | Expand 10 after
21982 env2->Global()->Set(v8_str("obj2"), object2); 21982 env2->Global()->Set(v8_str("obj2"), object2);
21983 ExpectString("typeof obj2.values", "function"); 21983 ExpectString("typeof obj2.values", "function");
21984 CHECK_NE(*object->Get(v8_str("values")), *object2->Get(v8_str("values"))); 21984 CHECK_NE(*object->Get(v8_str("values")), *object2->Get(v8_str("values")));
21985 21985
21986 auto values2 = Local<Function>::Cast(object2->Get(v8_str("values"))); 21986 auto values2 = Local<Function>::Cast(object2->Get(v8_str("values")));
21987 auto fn2 = i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*values2)); 21987 auto fn2 = i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*values2));
21988 auto ctx2 = v8::Utils::OpenHandle(*env2.local()); 21988 auto ctx2 = v8::Utils::OpenHandle(*env2.local());
21989 CHECK_EQ(fn2->GetCreationContext(), *ctx2); 21989 CHECK_EQ(fn2->GetCreationContext(), *ctx2);
21990 } 21990 }
21991 } 21991 }
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/double-equals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698