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

Unified Diff: tests/lib_strong/mirrors/delegate_library_test.dart

Issue 3011633002: Added back helper file accidentally deleted during test block 219 migration. (Closed)
Patch Set: Created 3 years, 4 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/lib_strong/mirrors/delegate_library_test.dart
diff --git a/tests/lib_strong/mirrors/delegate_library_test.dart b/tests/lib_strong/mirrors/delegate_library_test.dart
deleted file mode 100644
index f441a7b16bd95a8d08c7154eb8f4989da939132c..0000000000000000000000000000000000000000
--- a/tests/lib_strong/mirrors/delegate_library_test.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2015, 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.
-
-library test.delegate_library;
-
-import 'dart:mirrors';
-
-import 'package:expect/expect.dart';
-
-method(a, b, c) => "$a-$b-$c";
-methodWithNamed(a, {b: 'B', c}) => "$a-$b-$c";
-methodWithOpt(a, [b, c = 'C']) => "$a-$b-$c";
-get getter => 'g';
-set setter(x) {
- field = x * 2;
- return 'unobservable value';
-}
-
-var field;
-
-class Proxy {
- var targetMirror;
- Proxy(this.targetMirror);
- noSuchMethod(invocation) => targetMirror.delegate(invocation);
-}
-
-main() {
- var proxy = new Proxy(reflectClass(Proxy).owner);
- var result;
-
- Expect.equals('X-Y-Z', proxy.method('X', 'Y', 'Z'));
-
- Expect.equals('X-B-null', proxy.methodWithNamed('X'));
- Expect.equals('X-Y-null', proxy.methodWithNamed('X', b: 'Y'));
- Expect.equals('X-Y-Z', proxy.methodWithNamed('X', b: 'Y', c: 'Z'));
-
- Expect.equals('X-null-C', proxy.methodWithOpt('X'));
- Expect.equals('X-Y-C', proxy.methodWithOpt('X', 'Y'));
- Expect.equals('X-Y-Z', proxy.methodWithOpt('X', 'Y', 'Z'));
-
- Expect.equals('g', proxy.getter);
-
- Expect.equals(5, proxy.setter = 5);
- Expect.equals(10, proxy.field);
-
- Expect.equals(5, proxy.field = 5);
- Expect.equals(5, proxy.field);
-}
« no previous file with comments | « tests/lib_strong/mirrors/delegate_function_invocation_test.dart ('k') | tests/lib_strong/mirrors/delegate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698