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

Side by Side Diff: tests/kernel/unsorted/klass_field_initializer_test.dart

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (Closed)
Patch Set: Created 4 years, 2 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 import 'expect.dart';
Kevin Millikin (Google) 2016/10/21 09:10:57 Copyright header.
Vyacheslav Egorov (Google) 2016/10/21 13:39:43 Done.
2
3 class A {
4 var intField = 1;
5 var doubleField = 3.1415;
6 var stringField = "hello";
7 var o;
8
9 A(this.o);
10 }
11
12 class B extends A {
13 var nullField = null;
14 var nullField2;
15
16 var n;
17 var m;
18
19 B(this.n, o) : super(o), m = "m";
20 }
21
22 main() {
23 var o = new B("n", "o");
24 Expect.isTrue(o.intField == 1);
25 Expect.isTrue(o.doubleField == 3.1415);
26 Expect.isTrue(o.stringField == "hello");
27 Expect.isTrue(o.nullField == null);
28 Expect.isTrue(o.nullField2 == null);
29 Expect.isTrue(o.m == 'm');
30 Expect.isTrue(o.n == 'n');
31 Expect.isTrue(o.o == 'o');
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698