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

Unified Diff: tests/language/src/NamedParametersTypeTest.dart

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/language/src/NamedParametersTypeTest.dart
diff --git a/tests/language/src/NamedParametersTypeTest.dart b/tests/language/src/NamedParametersTypeTest.dart
deleted file mode 100644
index a6a87b2481692e428ecf7a65f01b6cb41780303f..0000000000000000000000000000000000000000
--- a/tests/language/src/NamedParametersTypeTest.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_type_checks
-//
-// Dart test program for testing named parameters in type tests.
-
-class NamedParametersTypeTest {
- static int testMain() {
- int result = 0;
- Function anyFunction;
- void acceptFunNumOptBool(void funNumOptBool(num num, [bool b])) { };
- void funNum(num num) { };
- void funNumBool(num num, bool b) { };
- void funNumOptBool(num num, [bool b = true]) { };
- void funNumOptBoolX(num num, [bool x = true]) { };
- anyFunction = funNum; // No error.
- anyFunction = funNumBool; // No error.
- anyFunction = funNumOptBool; // No error.
- anyFunction = funNumOptBoolX; // No error.
- acceptFunNumOptBool(funNumOptBool); // No error.
- try {
- acceptFunNumOptBool(funNum); // No static type warning.
- } catch (TypeError error) {
- result += 1;
- Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
- Expect.stringEquals("(num) => void", error.srcType);
- }
- try {
- acceptFunNumOptBool(funNumBool); /// static type warning
- } catch (TypeError error) {
- result += 10;
- Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
- Expect.stringEquals("(num, bool) => void", error.srcType);
- }
- try {
- acceptFunNumOptBool(funNumOptBoolX); /// static type warning
- } catch (TypeError error) {
- result += 100;
- Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
- Expect.stringEquals("(num, [x: bool]) => void", error.srcType);
- }
- return result;
- }
-}
-
-main() {
- Expect.equals(111, NamedParametersTypeTest.testMain());
-}
« no previous file with comments | « tests/language/src/NamedParametersTest.dart ('k') | tests/language/src/NamedParametersWithConversionsTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698