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

Side by Side Diff: tests/language_2/assert_message_test.dart

Issue 2990773002: Migrate language/arithmetic2_test ... language/async_await_syntax_test. (Closed)
Patch Set: Update migrated tests and statuses to Dart 2.0. Created 3 years, 4 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 // SharedOptions=--assert-message
6
7 import "dart:async"; 5 import "dart:async";
8 6
9 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
10 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
11 9
10 // TODO(rnystrom): Unify with assert_with_message_test.dart.
11
12 main() { 12 main() {
13 // Only run with asserts enabled mode. 13 // Only run with asserts enabled mode.
14 bool assertsEnabled = false; 14 bool assertsEnabled = false;
15 assert(assertsEnabled = true); 15 assert(assertsEnabled = true);
16 if (!assertsEnabled) return; 16 if (!assertsEnabled) return;
17 17
18 // Basics. 18 // Basics.
19 assert(true, ""); 19 assert(true, "");
20 assert(() => true, ""); 20 assert(() => true, "");
21 21
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } on AssertionError catch (e) { 96 } on AssertionError catch (e) {
97 Expect.equals(4, e.message); 97 Expect.equals(4, e.message);
98 } 98 }
99 99
100 try { 100 try {
101 assert(await falseFuture, await new Future.error("error")); 101 assert(await falseFuture, await new Future.error("error"));
102 } on String catch (e) { 102 } on String catch (e) {
103 Expect.equals("error", e); 103 Expect.equals("error", e);
104 } 104 }
105 } 105 }
OLDNEW
« no previous file with comments | « tests/language_2/assert_assignable_type_test.dart ('k') | tests/language_2/assert_trailing_comma_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698