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

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

Issue 2763823002: Move spaces from before comments to within comments (Closed)
Patch Set: Created 3 years, 9 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 // Test that 'identical(a,b)' is a compile-time constant. 7 // Test that 'identical(a,b)' is a compile-time constant.
8 8
9 class C { 9 class C {
10 final x; 10 final x;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 const CT(f1, C.f3), 83 const CT(f1, C.f3),
84 const CT(C.f3, identical), 84 const CT(C.f3, identical),
85 const CT(identical, i1), 85 const CT(identical, i1),
86 ]; 86 ];
87 87
88 // Not a constant if it's not written 'identical'. 88 // Not a constant if it's not written 'identical'.
89 const idtest = id(i1, i2); /// 01: compile-time error 89 const idtest = id(i1, i2); /// 01: compile-time error
90 90
91 // Not a constant if aliased? (Current interpretation, waiting for 91 // Not a constant if aliased? (Current interpretation, waiting for
92 // confirmation). 92 // confirmation).
93 class T { /// 02: compile-time error 93 class T { // /// 02: compile-time error
94 static const identical = id; /// 02: continued 94 static const identical = id; // /// 02: continued
95 static const idtest2 = identical(i1, i2); /// 02: continued 95 static const idtest2 = identical(i1, i2); /// 02: continued
96 } /// 02: continued 96 } // /// 02: continued
97 97
98 main() { 98 main() {
99 for (int i = 0; i < trueTests.length; i++) { 99 for (int i = 0; i < trueTests.length; i++) {
100 trueTests[i].test(Expect.isTrue, "true[$i]"); 100 trueTests[i].test(Expect.isTrue, "true[$i]");
101 } 101 }
102 for (int i = 0; i < falseTests.length; i++) { 102 for (int i = 0; i < falseTests.length; i++) {
103 falseTests[i].test(Expect.isFalse, "false[$i]"); 103 falseTests[i].test(Expect.isFalse, "false[$i]");
104 } 104 }
105 105
106 var x = idtest; /// 01: continued 106 var x = idtest; /// 01: continued
107 var x = T.idtest2; /// 02: continued 107 var x = T.idtest2; /// 02: continued
108 } 108 }
109 109
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698