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

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

Issue 2765693002: Update all tests (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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 void testSimpleScope() { 7 void testSimpleScope() {
8 { 8 {
9 var a = "Test"; 9 var a = "Test";
10 int b = 1; 10 int b = 1;
(...skipping 17 matching lines...) Expand all
28 Expect.equals(a, "Test"); 28 Expect.equals(a, "Test");
29 } 29 }
30 30
31 int testShadowingAfterUse() { 31 int testShadowingAfterUse() {
32 var a = 1; 32 var a = 1;
33 { 33 {
34 var b = 2; 34 var b = 2;
35 var c = a; // Use of 'a' prior to its shadow declaration below. 35 var c = a; // Use of 'a' prior to its shadow declaration below.
36 var d = b + c; 36 var d = b + c;
37 // Shadow declaration of 'a'. 37 // Shadow declaration of 'a'.
38 var a = 5; /// 01: compile-time error 38 var a = 5; //# 01: compile-time error
39 return d + a; 39 return d + a;
40 } 40 }
41 } 41 }
42 42
43 main() { 43 main() {
44 testSimpleScope(); 44 testSimpleScope();
45 testShadowingScope(); 45 testShadowingScope();
46 testShadowingAfterUse(); 46 testShadowingAfterUse();
47 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698