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

Side by Side Diff: tests/language/named_parameters_passing_falsy_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 // Dart test program for testing named parameters with various values that might 7 // Dart test program for testing named parameters with various values that might
8 // be implemented as 'falsy' values in a JavaScript implementation. 8 // be implemented as 'falsy' values in a JavaScript implementation.
9 9
10
11 class TestClass { 10 class TestClass {
12 TestClass(); 11 TestClass();
13 12
14 method([value = 100]) => value; 13 method([value = 100]) => value;
15 method2({value: 100}) => value; 14 method2({value: 100}) => value;
16 15
17 static staticMethod([value = 200]) => value; 16 static staticMethod([value = 200]) => value;
18 static staticMethod2({value: 200}) => value; 17 static staticMethod2({value: 200}) => value;
19 } 18 }
20 19
(...skipping 27 matching lines...) Expand all
48 Expect.equals(v, TestClass.staticMethod2(value: v)); 47 Expect.equals(v, TestClass.staticMethod2(value: v));
49 Expect.equals(v, globalMethod(v)); 48 Expect.equals(v, globalMethod(v));
50 Expect.equals(v, globalMethod2(value: v)); 49 Expect.equals(v, globalMethod2(value: v));
51 } 50 }
52 51
53 // Test via indirect call. 52 // Test via indirect call.
54 testFunction(obj.method, obj.method2); 53 testFunction(obj.method, obj.method2);
55 testFunction(TestClass.staticMethod, TestClass.staticMethod2); 54 testFunction(TestClass.staticMethod, TestClass.staticMethod2);
56 testFunction(globalMethod, globalMethod2); 55 testFunction(globalMethod, globalMethod2);
57 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698