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

Side by Side Diff: tests/lib/mirrors/generics_double_substitution_test.dart

Issue 2770063002: Revert "Format all multitests" (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
« no previous file with comments | « tests/lib/mirrors/generic_superclass_test.dart ('k') | tests/lib/mirrors/generics_test.dart » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 library test.generics_double_substitution; 5 library test.generics_double_substitution;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 class A<R> {} 10 class A<R> {}
11
12 class B<S> {} 11 class B<S> {}
13
14 class C<T> extends B<A<T>> { 12 class C<T> extends B<A<T>> {
15 A<T> field; 13 A<T> field;
16 A<T> returnType() {} 14 A<T> returnType() {}
17 parameterType(A<T> param) {} 15 parameterType(A<T> param) {}
18 } 16 }
19 17
20 main() { 18 main() {
21 ClassMirror cOfString = reflect(new C<String>()).type; 19 ClassMirror cOfString = reflect(new C<String>()).type;
22 ClassMirror aOfString = reflect(new A<String>()).type; 20 ClassMirror aOfString = reflect(new A<String>()).type;
23 21
24 VariableMirror field = cOfString.declarations[#field]; 22 VariableMirror field = cOfString.declarations[#field];
25 Expect.equals(aOfString, field.type); 23 Expect.equals(aOfString, field.type);
26 24
27 MethodMirror returnType = cOfString.declarations[#returnType]; 25 MethodMirror returnType = cOfString.declarations[#returnType];
28 Expect.equals(aOfString, returnType.returnType); 26 Expect.equals(aOfString, returnType.returnType);
29 27
30 MethodMirror parameterType = cOfString.declarations[#parameterType]; 28 MethodMirror parameterType = cOfString.declarations[#parameterType];
31 Expect.equals(aOfString, parameterType.parameters.single.type); 29 Expect.equals(aOfString, parameterType.parameters.single.type);
32 30
33 ClassMirror typeArgOfSuperclass = cOfString.superclass.typeArguments.single; 31 ClassMirror typeArgOfSuperclass = cOfString.superclass.typeArguments.single;
34 Expect.equals(aOfString, typeArgOfSuperclass); // //# 01: ok 32 Expect.equals(aOfString, typeArgOfSuperclass); // //# 01: ok
35 } 33 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/generic_superclass_test.dart ('k') | tests/lib/mirrors/generics_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698