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

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/mirrors/mixin_simple_test.dart

Issue 2535273002: Better mirrors support for mixins and private fields (Closed)
Patch Set: Address comments Created 4 years 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
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 library test.mixin;
6
7 import 'dart:mirrors';
8
9 import 'package:expect/expect.dart';
10
11 class Super {}
12 class Mixin {}
13 class Mixin2 {}
14
15 class Class extends Super with Mixin {}
16 class MultipleMixins extends Class with Mixin2 {}
17
18 main() {
19 Expect.equals(reflectClass(Class),
20 reflectClass(Class).mixin);
21 Expect.equals(reflectClass(Mixin),
22 reflectClass(Class).superclass.mixin);
23 Expect.equals(reflectClass(Super),
24 reflectClass(Class).superclass.superclass.mixin);
25
26 Expect.equals(reflectClass(MultipleMixins),
27 reflectClass(MultipleMixins).mixin);
28 Expect.equals(reflectClass(Mixin2),
29 reflectClass(MultipleMixins).superclass.mixin);
30 Expect.equals(reflectClass(Class),
31 reflectClass(MultipleMixins).superclass.superclass.mixin);
32 Expect.equals(reflectClass(Mixin),
33 reflectClass(MultipleMixins).superclass.superclass.superclass
34 .mixin);
35 Expect.equals(reflectClass(Super),
36 reflectClass(MultipleMixins).superclass.superclass.superclass
37 .superclass.mixin);
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698