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

Side by Side Diff: pkg/kernel/testcases/reify/simple_test.dart

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Get back parameter erroneously removed by previous commit Created 3 years, 10 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
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 simple_test;
6
7 import 'test_base.dart';
8
9 class C {}
10
11 class A implements C {}
12
13 class B extends C {}
14
15 class D extends B {}
16
17 testIs(o) {
18 write(o is A);
19 write(o is B);
20 write(o is C);
21 write(o is D);
22 }
23
24 testIsNot(o) {
25 write(o is! A);
26 write(o is! B);
27 write(o is! C);
28 write(o is! D);
29 }
30
31 main() {
32 var objects = [new A(), new B(), new C(), new D()];
33 objects.forEach(testIs);
34 objects.forEach(testIsNot);
35
36 expectOutput("""
37 true
38 false
39 true
40 false
41 false
42 true
43 true
44 false
45 false
46 false
47 true
48 false
49 false
50 true
51 true
52 true
53 false
54 true
55 false
56 true
57 true
58 false
59 false
60 true
61 true
62 true
63 false
64 true
65 true
66 false
67 false
68 false""");
69 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/reify/runtime_type_test.dart.expect ('k') | pkg/kernel/testcases/reify/simple_test.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698