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

Side by Side Diff: tests/language_strong/positional_parameters_type_test.dart

Issue 2768073002: Format all multitests (Closed)
Patch Set: Created 3 years, 9 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 // VMOptions=--checked 4 // VMOptions=--checked
5 // 5 //
6 // Dart test program for testing optional positional parameters in type tests. 6 // Dart test program for testing optional positional parameters in type tests.
7 7
8 main() { 8 main() {
9 Function anyFunction; 9 Function anyFunction;
10 void acceptFunNumOptBool(void funNumOptBool(num n, [bool b])) { }; 10 void acceptFunNumOptBool(void funNumOptBool(num n, [bool b])) {}
11 void funNum(num n) { }; 11 ;
12 void funNumBool(num n, bool b) { }; 12 void funNum(num n) {}
13 void funNumOptBool(num n, [bool b = true]) { }; 13 ;
14 void funNumOptBoolX(num n, [bool x = true]) { }; 14 void funNumBool(num n, bool b) {}
15 ;
16 void funNumOptBool(num n, [bool b = true]) {}
17 ;
18 void funNumOptBoolX(num n, [bool x = true]) {}
19 ;
15 anyFunction = funNum; 20 anyFunction = funNum;
16 anyFunction = funNumBool; 21 anyFunction = funNumBool;
17 anyFunction = funNumOptBool; 22 anyFunction = funNumOptBool;
18 anyFunction = funNumOptBoolX; 23 anyFunction = funNumOptBoolX;
19 acceptFunNumOptBool(funNumOptBool); 24 acceptFunNumOptBool(funNumOptBool);
20 acceptFunNumOptBool(funNumOptBoolX); 25 acceptFunNumOptBool(funNumOptBoolX);
21 acceptFunNumOptBool(funNum); // //# 01: runtime error 26 acceptFunNumOptBool(funNum); // //# 01: runtime error
22 acceptFunNumOptBool(funNumBool); // //# 02: static type warning, runtime error 27 acceptFunNumOptBool(funNumBool); // //# 02: static type warning, runtime error
23 } 28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698