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

Unified Diff: tests/language/src/NamedParametersPassingFalsyTest.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/NamedParametersPassingFalsyTest.dart
diff --git a/tests/language/src/NamedParametersPassingFalsyTest.dart b/tests/language/src/NamedParametersPassingFalsyTest.dart
deleted file mode 100644
index e3d8fbd468fb24f728109e14ddaba192a57732a2..0000000000000000000000000000000000000000
--- a/tests/language/src/NamedParametersPassingFalsyTest.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.
-
-// Dart test program for testing named parameters with various values that might
-// be implemented as 'falsy' values in a JavaScript implementation.
-
-
-class TestClass {
- TestClass();
-
- method([value = 100]) => value;
-
- static staticMethod([value = 200]) => value;
-}
-
-globalMethod([value = 300]) => value;
-
-final testValues = const [0, 0.0, '', false, null];
-
-testFunction(f) {
- Expect.isTrue(f() >= 100);
- for (var v in testValues) {
- Expect.equals(v, f(v));
- Expect.equals(v, f(value: v));
- }
-}
-
-main() {
- var obj = new TestClass();
-
- Expect.equals(100, obj.method());
- Expect.equals(200, TestClass.staticMethod());
- Expect.equals(300, globalMethod());
-
- for (var v in testValues) {
- Expect.equals(v, obj.method(v));
- Expect.equals(v, obj.method(value: v));
- Expect.equals(v, TestClass.staticMethod(v));
- Expect.equals(v, TestClass.staticMethod(value: v));
- Expect.equals(v, globalMethod(v));
- Expect.equals(v, globalMethod(value: v));
- }
-
- // Test via indirect call.
- testFunction(obj.method);
- testFunction(TestClass.staticMethod);
- testFunction(globalMethod);
-}
« no previous file with comments | « tests/language/src/NamedParametersPassingFalseTest.dart ('k') | tests/language/src/NamedParametersPassingNullTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698