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

Side by Side Diff: tests/language_2/assertion_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) 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 // VMOptions=--enable_type_checks 4 // VMOptions=--enable_type_checks --enable_asserts
5 // 5
6 // Dart test program testing assert statements. 6 // Dart test program testing assert statements.
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 testTrue() { 10 testTrue() {
11 int i = 0; 11 int i = 0;
12 try { 12 try {
13 assert(true); 13 assert(true);
14 } on AssertionError catch (error) { 14 } on AssertionError catch (error) {
15 i = 1; 15 i = 1;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 Expect.equals('hi', testMessage(() => false, 'hi').message); 106 Expect.equals('hi', testMessage(() => false, 'hi').message);
107 107
108 // These errors do not have the message because boolean conversion failed. 108 // These errors do not have the message because boolean conversion failed.
109 Expect.equals(null, testMessage(null, 1234).message); 109 Expect.equals(null, testMessage(null, 1234).message);
110 Expect.equals(null, testMessage(null, 'hi').message); 110 Expect.equals(null, testMessage(null, 'hi').message);
111 Expect.equals(null, testMessage(() => null, 1234).message); 111 Expect.equals(null, testMessage(() => null, 1234).message);
112 Expect.equals(null, testMessage(() => null, 'hi').message); 112 Expect.equals(null, testMessage(() => null, 'hi').message);
113 Expect.isTrue("${testMessage(42, 1234)}".contains('boolean expression')); 113 Expect.isTrue("${testMessage(42, 1234)}".contains('boolean expression'));
114 Expect.isTrue("${testMessage(() => 1, 1234)}".contains('boolean expression')); 114 Expect.isTrue("${testMessage(() => 1, 1234)}".contains('boolean expression'));
115 } 115 }
OLDNEW
« no previous file with comments | « tests/language_2/assertion_initializer_test.dart ('k') | tests/language_2/assign_instance_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698