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

Side by Side Diff: test_reflectable/test/parameter_test.dart

Issue 1297503006: Clarifies the status of implicit accessors; fixed several related bugs. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Review response. Created 5 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 unified diff | Download patch
« no previous file with comments | « test_reflectable/test/implicit_getter_setter_test.dart ('k') | tool/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart Team. All rights reserved. Use of this 1 // Copyright (c) 2015, the Dart Team. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in 2 // source code is governed by a BSD-style license that can be found in
3 // the LICENSE file. 3 // the LICENSE file.
4 4
5 // File being transformed by the reflectable transformer. 5 // File being transformed by the reflectable transformer.
6 // Accesses method parameters and their properties, such as 6 // Accesses method parameters and their properties, such as
7 // existence, being optional, type annotations. 7 // existence, being optional, type annotations.
8 8
9 library test_reflectable.test.parameter_test; 9 library test_reflectable.test.parameter_test;
10 10
11 import 'package:reflectable/reflectable.dart'; 11 import 'package:reflectable/reflectable.dart';
12 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
13 13
14 // TODO(eernst) implement: Avoid testing the same things twice in this test and
15 // in 'parameter_mirrors_test.dart'.
16
14 class MyReflectable extends Reflectable { 17 class MyReflectable extends Reflectable {
15 const MyReflectable() 18 const MyReflectable()
16 : super(typeCapability, invokingCapability, declarationsCapability); 19 : super(typeCapability, invokingCapability, declarationsCapability);
17 } 20 }
18 21
19 const myReflectable = const MyReflectable(); 22 const myReflectable = const MyReflectable();
20 23
21 @myReflectable 24 @myReflectable
22 class MyClass { 25 class MyClass {
23 int arg0() => null; 26 int arg0() => null;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 expect(namedArgumentsParameter0.type.reflectedType, String); 163 expect(namedArgumentsParameter0.type.reflectedType, String);
161 expect(namedArgumentsParameter1.isOptional, false); 164 expect(namedArgumentsParameter1.isOptional, false);
162 expect(namedArgumentsParameter1.type.reflectedType, List); 165 expect(namedArgumentsParameter1.type.reflectedType, List);
163 expect(namedArgumentsParameter2.isOptional, true); 166 expect(namedArgumentsParameter2.isOptional, true);
164 expect(namedArgumentsParameter2.isNamed, true); 167 expect(namedArgumentsParameter2.isNamed, true);
165 expect(namedArgumentsParameter2.type.reflectedType, String); 168 expect(namedArgumentsParameter2.type.reflectedType, String);
166 expect(namedArgumentsParameter2.hasDefaultValue, true); 169 expect(namedArgumentsParameter2.hasDefaultValue, true);
167 expect(namedArgumentsParameter2.defaultValue, "42"); 170 expect(namedArgumentsParameter2.defaultValue, "42");
168 }); 171 });
169 } 172 }
OLDNEW
« no previous file with comments | « test_reflectable/test/implicit_getter_setter_test.dart ('k') | tool/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698