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

Side by Side Diff: test/cctest/test-func-name-inference.cc

Issue 877753007: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: VS201x now happy? Created 5 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 | « test/cctest/test-flags.cc ('k') | test/cctest/test-global-object.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 isolate->debug()->PrepareForBreakPoints(); 83 isolate->debug()->PrepareForBreakPoints();
84 Object* shared_func_info_ptr = 84 Object* shared_func_info_ptr =
85 isolate->debug()->FindSharedFunctionInfoInScript(i_script, func_pos); 85 isolate->debug()->FindSharedFunctionInfoInScript(i_script, func_pos);
86 CHECK(shared_func_info_ptr != CcTest::heap()->undefined_value()); 86 CHECK(shared_func_info_ptr != CcTest::heap()->undefined_value());
87 Handle<SharedFunctionInfo> shared_func_info( 87 Handle<SharedFunctionInfo> shared_func_info(
88 SharedFunctionInfo::cast(shared_func_info_ptr)); 88 SharedFunctionInfo::cast(shared_func_info_ptr));
89 89
90 // Verify inferred function name. 90 // Verify inferred function name.
91 SmartArrayPointer<char> inferred_name = 91 SmartArrayPointer<char> inferred_name =
92 shared_func_info->inferred_name()->ToCString(); 92 shared_func_info->inferred_name()->ToCString();
93 CHECK_EQ(ref_inferred_name, inferred_name.get()); 93 CHECK_EQ(0, strcmp(ref_inferred_name, inferred_name.get()));
94 } 94 }
95 95
96 96
97 static v8::Handle<v8::Script> Compile(v8::Isolate* isolate, const char* src) { 97 static v8::Handle<v8::Script> Compile(v8::Isolate* isolate, const char* src) {
98 return v8::Script::Compile(v8::String::NewFromUtf8(isolate, src)); 98 return v8::Script::Compile(v8::String::NewFromUtf8(isolate, src));
99 } 99 }
100 100
101 101
102 TEST(GlobalProperty) { 102 TEST(GlobalProperty) {
103 CcTest::InitializeVM(); 103 CcTest::InitializeVM();
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 " };\n" 499 " };\n"
500 " var foo = 10;\n" 500 " var foo = 10;\n"
501 " function f() {\n" 501 " function f() {\n"
502 " return wrapCode();\n" 502 " return wrapCode();\n"
503 " }\n" 503 " }\n"
504 " this.ref = f;\n" 504 " this.ref = f;\n"
505 "})()"); 505 "})()");
506 script->Run(); 506 script->Run();
507 CheckFunctionName(script, "return 2012", ""); 507 CheckFunctionName(script, "return 2012", "");
508 } 508 }
OLDNEW
« no previous file with comments | « test/cctest/test-flags.cc ('k') | test/cctest/test-global-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698