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

Side by Side Diff: tests/language_strong/assignable_expression_test.dart

Issue 2765893003: Fix warnings_checker.dart handling of multitests (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) 2013, the Dart project authors. Please see the AUTHORS file 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 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 // Test to detect syntactically illegal left-hand-side (assignable) 5 // Test to detect syntactically illegal left-hand-side (assignable)
6 // expressions. 6 // expressions.
7 7
8 class C { 8 class C {
9 static var static_field = 0; 9 static var static_field = 0;
10 } 10 }
11 11
12 var tl_static_var = 0; 12 var tl_static_var = 0;
13 13
14 main() { 14 main() {
15 tl_static_var = 0; 15 tl_static_var = 0;
16 (tl_static_var) = 0; // /// 01: compile-time error 16 (tl_static_var) = 0; // //# 01: compile-time error
17 (tl_static_var)++; // /// 02: compile-time error 17 (tl_static_var)++; // //# 02: compile-time error
18 ++(tl_static_var); // /// 03: compile-time error 18 ++(tl_static_var); // //# 03: compile-time error
19 19
20 C.static_field = 0; 20 C.static_field = 0;
21 (C.static_field) = 0; // /// 11: compile-time error 21 (C.static_field) = 0; // //# 11: compile-time error
22 (C.static_field)++; // /// 12: compile-time error 22 (C.static_field)++; // //# 12: compile-time error
23 ++(C.static_field); // /// 13: compile-time error 23 ++(C.static_field); // //# 13: compile-time error
24 24
25 tl_static_var = [1, 2, 3]; 25 tl_static_var = [1, 2, 3];
26 tl_static_var[0] = 0; 26 tl_static_var[0] = 0;
27 (tl_static_var)[0] = 0; 27 (tl_static_var)[0] = 0;
28 (tl_static_var[0]) = 0; // /// 21: compile-time error 28 (tl_static_var[0]) = 0; // //# 21: compile-time error
29 (tl_static_var[0])++; // /// 22: compile-time error 29 (tl_static_var[0])++; // //# 22: compile-time error
30 ++(tl_static_var[0]); // /// 23: compile-time error 30 ++(tl_static_var[0]); // //# 23: compile-time error
31 31
32 C.static_field = [1, 2, 3]; 32 C.static_field = [1, 2, 3];
33 (C.static_field[0]) = 0; // /// 31: compile-time error 33 (C.static_field[0]) = 0; // //# 31: compile-time error
34 (C.static_field[0])++; // /// 32: compile-time error 34 (C.static_field[0])++; // //# 32: compile-time error
35 ++(C.static_field[0]); // /// 33: compile-time error 35 ++(C.static_field[0]); // //# 33: compile-time error
36 36
37 var a = 0; 37 var a = 0;
38 (a) = 0; // /// 41: compile-time error 38 (a) = 0; // //# 41: compile-time error
39 (a)++; // /// 42: compile-time error 39 (a)++; // //# 42: compile-time error
40 ++(a); // /// 43: compile-time error 40 ++(a); // //# 43: compile-time error
41 41
42 // Neat palindrome expression. x is assignable, ((x)) is not. 42 // Neat palindrome expression. x is assignable, ((x)) is not.
43 var funcnuf = (x) => ((x))=((x)) <= (x); // /// 50: compile-time error 43 var funcnuf = (x) => ((x))=((x)) <= (x); // //# 50: compile-time error
44 } 44 }
OLDNEW
« no previous file with comments | « tests/language_strong/assign_top_method_test.dart ('k') | tests/language_strong/async_await_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698