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

Side by Side Diff: test/cctest/compiler/test-run-jscalls.cc

Issue 2161413002: Adjust whitespace to make tests oblivious to --harmony-function-tostring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | test/mjsunit/es6/function-name.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/cctest/compiler/function-tester.h" 5 #include "test/cctest/compiler/function-tester.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 T.CheckCall(T.Val(3), U.function, T.Val(3)); 26 T.CheckCall(T.Val(3), U.function, T.Val(3));
27 T.CheckCall(T.Val(3.1), U.function, T.Val(3.1)); 27 T.CheckCall(T.Val(3.1), U.function, T.Val(3.1));
28 T.CheckCall(U.function, U.function, U.function); 28 T.CheckCall(U.function, U.function, U.function);
29 T.CheckCall(T.Val("Abba"), U.function, T.Val("Abba")); 29 T.CheckCall(T.Val("Abba"), U.function, T.Val("Abba"));
30 } 30 }
31 31
32 32
33 TEST(ConstCall) { 33 TEST(ConstCall) {
34 FunctionTester T("(function(foo,a) { return foo(a,3); })"); 34 FunctionTester T("(function(foo,a) { return foo(a,3); })");
35 FunctionTester U("(function(a,b) { return a + b; })"); 35 FunctionTester U("(function (a,b) { return a + b; })");
36 36
37 T.CheckCall(T.Val(6), U.function, T.Val(3)); 37 T.CheckCall(T.Val(6), U.function, T.Val(3));
38 T.CheckCall(T.Val(6.1), U.function, T.Val(3.1)); 38 T.CheckCall(T.Val(6.1), U.function, T.Val(3.1));
39 T.CheckCall(T.Val("function (a,b) { return a + b; }3"), U.function, 39 T.CheckCall(T.Val("function (a,b) { return a + b; }3"), U.function,
40 U.function); 40 U.function);
41 T.CheckCall(T.Val("Abba3"), U.function, T.Val("Abba")); 41 T.CheckCall(T.Val("Abba3"), U.function, T.Val("Abba"));
42 } 42 }
43 43
44 44
45 TEST(ConstCall2) { 45 TEST(ConstCall2) {
46 FunctionTester T("(function(foo,a) { return foo(a,\"3\"); })"); 46 FunctionTester T("(function(foo,a) { return foo(a,\"3\"); })");
47 FunctionTester U("(function(a,b) { return a + b; })"); 47 FunctionTester U("(function (a,b) { return a + b; })");
48 48
49 T.CheckCall(T.Val("33"), U.function, T.Val(3)); 49 T.CheckCall(T.Val("33"), U.function, T.Val(3));
50 T.CheckCall(T.Val("3.13"), U.function, T.Val(3.1)); 50 T.CheckCall(T.Val("3.13"), U.function, T.Val(3.1));
51 T.CheckCall(T.Val("function (a,b) { return a + b; }3"), U.function, 51 T.CheckCall(T.Val("function (a,b) { return a + b; }3"), U.function,
52 U.function); 52 U.function);
53 T.CheckCall(T.Val("Abba3"), U.function, T.Val("Abba")); 53 T.CheckCall(T.Val("Abba3"), U.function, T.Val("Abba"));
54 } 54 }
55 55
56 56
57 TEST(PropertyNamedCall) { 57 TEST(PropertyNamedCall) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 CHECK(context->Global() 247 CHECK(context->Global()
248 ->Set(context, v8_str("foo"), v8::Utils::CallableToLocal(jsfun)) 248 ->Set(context, v8_str("foo"), v8::Utils::CallableToLocal(jsfun))
249 .FromJust()); 249 .FromJust());
250 CompileRun("var x = 24;"); 250 CompileRun("var x = 24;");
251 ExpectObject("foo()", context->Global()); 251 ExpectObject("foo()", context->Global());
252 } 252 }
253 253
254 } // namespace compiler 254 } // namespace compiler
255 } // namespace internal 255 } // namespace internal
256 } // namespace v8 256 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/function-name.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698