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

Unified Diff: tests/language_2/bool_condition_check_test.dart

Issue 2985243002: Migrate block 44. (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: tests/language_2/bool_condition_check_test.dart
diff --git a/tests/language_strong/bool_condition_check_test.dart b/tests/language_2/bool_condition_check_test.dart
similarity index 66%
rename from tests/language_strong/bool_condition_check_test.dart
rename to tests/language_2/bool_condition_check_test.dart
index c3db7ff795b0776df0f22df66601b79d1035be65..f351789d081e159b2761c441561a9ea9a3e07ec2 100644
--- a/tests/language_strong/bool_condition_check_test.dart
+++ b/tests/language_2/bool_condition_check_test.dart
@@ -3,15 +3,15 @@
// BSD-style license that can be found in the LICENSE file.
// Check that passing `null` for a boolean typed parameter will still cause
-// a boolean conversion error when used in a condition in checked mode.
+// a boolean conversion error when used in a condition.
import 'package:expect/expect.dart';
@NoInline()
String check({bool a, bool b}) {
- String a_string = a ? 'a' : '';
- String b_string = b ? 'b' : '';
- return '$a_string$b_string';
+ String aString = a ? 'a' : '';
+ String bString = b ? 'b' : '';
+ return '$aString$bString';
}
class Class {
@@ -20,5 +20,7 @@ class Class {
}
main() {
- Expect.equals('', new Class(a: null, b: null).field); //# 01: dynamic type error
+ Expect.throwsAssertionError(() {
+ new Class(a: null, b: null).field;
+ });
}

Powered by Google App Engine
This is Rietveld 408576698