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

Side by Side Diff: tests/language/canonical_const3_test.dart

Issue 16780009: When canonicalize instances check if all fields are canonical. If a field is a non-canonical number… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, 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 // Check proper canonicalization (fields must be canonicalized as well).
6
7 import "package:expect/expect.dart";
8
9
10 main() {
11 Expect.isFalse(identical(new Duration(days: 1), new Duration(days: 1)));
12 Expect.isTrue(identical(const Duration(days: 2), const Duration(days: 2)));
13 Expect.isTrue(identical(const B(3.0), const B(3.0)));
14 Expect.isTrue(identical(const F(main), const F(main)));
15 }
16
17
18 class A {
19 final a;
20 const A(v) : a = v + 3.4;
21 }
22
23 class B extends A {
24 final b;
25 const B(v) : super(v), b = v + 1.0;
26 }
27
28 class F {
29 final f;
30 const F(v) : f = v;
31 }
OLDNEW
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698