Index: pkg/analyzer/test/generated/non_error_resolver_test.dart |
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart |
index dedbb2a4523b6d8b4e898bf233d50e15913ac329..df6a0766db6d52f238b25020d4b003a446be4066 100644 |
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart |
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart |
@@ -262,6 +262,70 @@ f(A a) { |
verify([source]); |
} |
+ void test_assert_with_message_await() { |
+ resetWithOptions(new AnalysisOptionsImpl()..enableAssertMessage = true); |
+ Source source = addSource(''' |
+import 'dart:async'; |
+f() async { |
+ assert(false, await g()); |
+} |
+Future<String> g() => null; |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertNoErrors(source); |
+ verify([source]); |
+ } |
+ |
+ void test_assert_with_message_dynamic() { |
+ resetWithOptions(new AnalysisOptionsImpl()..enableAssertMessage = true); |
+ Source source = addSource(''' |
+f() { |
+ assert(false, g()); |
+} |
+g() => null; |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertNoErrors(source); |
+ verify([source]); |
+ } |
+ |
+ void test_assert_with_message_null() { |
+ resetWithOptions(new AnalysisOptionsImpl()..enableAssertMessage = true); |
+ Source source = addSource(''' |
+f() { |
+ assert(false, null); |
+} |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertNoErrors(source); |
+ verify([source]); |
+ } |
+ |
+ void test_assert_with_message_string() { |
+ resetWithOptions(new AnalysisOptionsImpl()..enableAssertMessage = true); |
+ Source source = addSource(''' |
+f() { |
+ assert(false, 'message'); |
+} |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertNoErrors(source); |
+ verify([source]); |
+ } |
+ |
+ void test_assert_with_message_suppresses_unused_var_hint() { |
+ resetWithOptions(new AnalysisOptionsImpl()..enableAssertMessage = true); |
+ Source source = addSource(''' |
+f() { |
+ String message = 'msg'; |
+ assert(true, message); |
+} |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertNoErrors(source); |
+ verify([source]); |
+ } |
+ |
void test_assignability_function_expr_rettype_from_typedef_cls() { |
// In the code below, the type of (() => f()) has a return type which is |
// a class, and that class is inferred from the return type of the typedef |