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

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

Issue 2992003002: Migrate block 37, language/arithmetic2 ... /async_await_syntax_test. (Closed)
Patch Set: 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 main() { 7 main() {
8 var assertsEnabled = false; 8 var assertsEnabled = false;
9 assert((assertsEnabled = true)); 9 assert((assertsEnabled = true));
10 if (!assertsEnabled) return; 10 if (!assertsEnabled) return;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 var toString = new ToString(); 79 var toString = new ToString();
80 try { 80 try {
81 assert(false, toString); 81 assert(false, toString);
82 Expect.fail("Assert should throw."); 82 Expect.fail("Assert should throw.");
83 } catch (e) { 83 } catch (e) {
84 Expect.isFalse(toString.calledToString); 84 Expect.isFalse(toString.calledToString);
85 Expect.isTrue(e.toString().contains("Instance of 'ToString'")); 85 Expect.isTrue(e.toString().contains("Instance of 'ToString'"));
86 Expect.isFalse(toString.calledToString); 86 Expect.isFalse(toString.calledToString);
87 } 87 }
88 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698