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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1480433002: Add support for assert statements with messages to the analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 851a4ee69047ad753d280cbedd668fa751bf81b3..47857c8bd863c66befe9a05e9dd5fd587e30b026 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -262,6 +262,19 @@ main() {
verify([source]);
}
+ void test_assertWithExtraArgument() {
+ // TODO(paulberry): once DEP 37 is turned on by default, this test should
+ // be removed.
+ Source source = addSource('''
+f(bool x) {
+ assert(x, 'foo');
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTRA_ARGUMENT_TO_ASSERT]);
+ verify([source]);
+ }
+
void test_async_used_as_identifier_in_annotation() {
Source source = addSource('''
const int async = 0;

Powered by Google App Engine
This is Rietveld 408576698