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

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

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 // VMOptions=--enable_type_checks 4 // VMOptions=--enable_type_checks
5 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 main() { 8 main() {
9 var a; 9 var a;
10 Expect.throws(() { true && (a = 5); }, (error) => error is TypeError); 10 Expect.throws(() {
11 Expect.throws(() { (a = 5) && true; }, (error) => error is TypeError); 11 true && (a = 5);
12 Expect.throws(() { false || (a = 5); }, (error) => error is TypeError); 12 }, (error) => error is TypeError);
13 Expect.throws(() { (a = 5) || false; }, (error) => error is TypeError); 13 Expect.throws(() {
14 Expect.throws(() { (a = 5) || true; }, (error) => error is TypeError); 14 (a = 5) && true;
15 }, (error) => error is TypeError);
16 Expect.throws(() {
17 false || (a = 5);
18 }, (error) => error is TypeError);
19 Expect.throws(() {
20 (a = 5) || false;
21 }, (error) => error is TypeError);
22 Expect.throws(() {
23 (a = 5) || true;
24 }, (error) => error is TypeError);
15 25
16 // No exceptions thrown. 26 // No exceptions thrown.
17 false && (a = 5); 27 false && (a = 5);
18 true || (a = 5); 28 true || (a = 5);
19 } 29 }
20
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698