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

Side by Side Diff: tests/unsorted/immutability_test.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « tests/unsorted/dart2js_helper.dart ('k') | tests/unsorted/messaging_benchmark_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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'dart:fletch'; 5 import 'dart:dartino';
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 8
9 // This class is missing: final fields and const constructor. 9 // This class is missing: final fields and const constructor.
10 class Fisk { 10 class Fisk {
11 int age; 11 int age;
12 Fisk(this.age); 12 Fisk(this.age);
13 } 13 }
14 14
15 // This class is missing: const constructor. 15 // This class is missing: const constructor.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 testMutable(new Node(nonConstConstructorObj, leaf)); 71 testMutable(new Node(nonConstConstructorObj, leaf));
72 testMutable(new Node(new Node(leaf, nonConstConstructorObj), leaf)); 72 testMutable(new Node(new Node(leaf, nonConstConstructorObj), leaf));
73 int y; 73 int y;
74 testMutable(() { y = 4; }); 74 testMutable(() { y = 4; });
75 75
76 // TODO(kustermann): Runtime types are not working ATM. 76 // TODO(kustermann): Runtime types are not working ATM.
77 // Expect.isFalse(isImmutable(bool)); 77 // Expect.isFalse(isImmutable(bool));
78 // Expect.isFalse(isImmutable(String)); 78 // Expect.isFalse(isImmutable(String));
79 // Expect.isFalse(isImmutable(Hest)); 79 // Expect.isFalse(isImmutable(Hest));
80 80
81 // TODO(kustermann/fletchc-experts): Allow self recursive closures. 81 // TODO(kustermann/dartino_compiler-experts): Allow self recursive closures.
82 // [The recursive reference causes a storeField instruction to be 82 // [The recursive reference causes a storeField instruction to be
83 // emitted which makes it mutable ATM.] 83 // emitted which makes it mutable ATM.]
84 void recurse(x) { if (x > 0) { return recurse(x - 1); } } 84 void recurse(x) { if (x > 0) { return recurse(x - 1); } }
85 Expect.isFalse(isImmutable(recurse)); 85 Expect.isFalse(isImmutable(recurse));
86 } 86 }
87 87
88 testImmutable(obj) { 88 testImmutable(obj) {
89 Expect.isTrue(isImmutable(obj)); 89 Expect.isTrue(isImmutable(obj));
90 } 90 }
91 91
92 testMutable(obj) { 92 testMutable(obj) {
93 Expect.isFalse(isImmutable(obj)); 93 Expect.isFalse(isImmutable(obj));
94 } 94 }
95 95
OLDNEW
« no previous file with comments | « tests/unsorted/dart2js_helper.dart ('k') | tests/unsorted/messaging_benchmark_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698