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

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

Issue 2451893004: Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."" (Closed)
Patch Set: Created 4 years, 1 month 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.md file.
4
5 import 'expect.dart';
6
7 String log;
8 init() { log = ''; }
9 logit(msg) { return log = '$log$msg'; }
10
11 class Base {
12 var b;
13 Base.arg0() : b = logit('b') {
14 logit('B');
15 }
16 Base.arg1(a) : b = logit('b') {
17 logit('B');
18 }
19 Base.arg2(a, b) : b = logit('b') {
20 logit('B');
21 }
22 }
23
24 class Sub extends Base {
25 var x;
26 var s;
27 Sub.arg0() : x = logit('x'), super.arg0(), s = logit('s') {
28 logit('S');
29 }
30 Sub.arg1(a) : x = logit('x'), super.arg1(logit('1')), s = logit('s') {
31 logit('S');
32 }
33 Sub.arg2(a, b) : x = logit('x'), super.arg2(logit('1'), logit('2')), s = logit ('s') {
34 logit('S');
35 }
36 }
37
38 test(fun(), String result) {
39 init();
40 fun();
41 Expect.isTrue(log == result);
42 }
43
44 main() {
45 test(() => new Sub.arg0(), 'xsbBS');
46 test(() => new Sub.arg1(1), 'x1sbBS');
47 test(() => new Sub.arg2(1, 2), 'x12sbBS');
48 }
OLDNEW
« no previous file with comments | « tests/kernel/unsorted/string_concatenation_test.dart ('k') | tests/kernel/unsorted/super_mixin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698