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

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

Issue 126195: Fix issue 380. (Closed)
Patch Set: Created 11 years, 6 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/rewriter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 v8::HandleScope scope; 244 v8::HandleScope scope;
245 245
246 v8::Handle<v8::Script> script = Compile( 246 v8::Handle<v8::Script> script = Compile(
247 "function MyClass() {}\n" 247 "function MyClass() {}\n"
248 "MyClass.prototype = {\n" 248 "MyClass.prototype = {\n"
249 " method1: 0 ? function() { return 1; } :\n" 249 " method1: 0 ? function() { return 1; } :\n"
250 " function() { return 2; } }"); 250 " function() { return 2; } }");
251 CheckFunctionName(script, "return 1", "MyClass.method1"); 251 CheckFunctionName(script, "return 1", "MyClass.method1");
252 CheckFunctionName(script, "return 2", "MyClass.method1"); 252 CheckFunctionName(script, "return 2", "MyClass.method1");
253 } 253 }
254
255
256 // See http://code.google.com/p/v8/issues/detail?id=380
257 TEST(Issue380) {
258 InitializeVM();
259 v8::HandleScope scope;
260
261 v8::Handle<v8::Script> script = Compile(
262 "function a() {\n"
263 "var result = function(p,a,c,k,e,d)"
264 "{return p}(\"if blah blah\",62,1976,\'a|b\'.split(\'|\'),0,{})\n"
265 "}");
266 CheckFunctionName(script, "return p", "");
267 }
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698