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

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

Issue 2765693002: Update all tests (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 named parameters in type tests. 6 // Dart test program for testing optional named 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 void funNum(num n) { };
12 void funNumBool(num n, bool b) { }; 12 void funNumBool(num n, bool b) { };
13 void funNumOptBool(num n, {bool b: true}) { }; 13 void funNumOptBool(num n, {bool b: true}) { };
14 void funNumOptBoolX(num n, {bool x: true}) { }; 14 void funNumOptBoolX(num n, {bool x: true}) { };
15 anyFunction = funNum; 15 anyFunction = funNum;
16 anyFunction = funNumBool; 16 anyFunction = funNumBool;
17 anyFunction = funNumOptBool; 17 anyFunction = funNumOptBool;
18 anyFunction = funNumOptBoolX; 18 anyFunction = funNumOptBoolX;
19 acceptFunNumOptBool(funNumOptBool); 19 acceptFunNumOptBool(funNumOptBool);
20 acceptFunNumOptBool(funNum); /// 01: runtime error 20 acceptFunNumOptBool(funNum); //# 01: runtime error
21 acceptFunNumOptBool(funNumBool); /// 02: static type warning, runtime error 21 acceptFunNumOptBool(funNumBool); //# 02: static type warning, runtime error
22 acceptFunNumOptBool(funNumOptBoolX); /// 03: static type warning, runtime err or 22 acceptFunNumOptBool(funNumOptBoolX); //# 03: static type warning, runtime err or
23 } 23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698