From 8df1dc0b564c9cd7021b61e8c65d764996484a44 Mon Sep 17 00:00:00 2001 From: Greg Littlefield Date: Tue, 15 Oct 2024 20:01:58 -0700 Subject: [PATCH] Fix error message assertion in Dart 3 --- test/over_react/component/lazy_test.dart | 4 ++-- test/over_react/util/prop_conversion_test.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/over_react/component/lazy_test.dart b/test/over_react/component/lazy_test.dart index 46954047f..21454cbd5 100644 --- a/test/over_react/component/lazy_test.dart +++ b/test/over_react/component/lazy_test.dart @@ -320,8 +320,8 @@ sharedNestedPropConversionTests(UiFactory builder, {bool isJsCompon // DDC error message matches( RegExp(r"Expected a value of type 'Map[^']*', but got one of type '(Native|Legacy)JavaScriptObject'")), - // dart2js error message - matches(RegExp(r"type '(Unknown|Plain)JavaScriptObject' is not a subtype of type 'Map[^']*'")), + // Dart 2 dart2js, Dart 3 DDC error message + matches(RegExp(r"type '(Unknown|Plain|Legacy)JavaScriptObject' is not a subtype of type 'Map[^']*'")), )), ]); if (!isJsComponent) { diff --git a/test/over_react/util/prop_conversion_test.dart b/test/over_react/util/prop_conversion_test.dart index 13ca46d72..b53a46a07 100644 --- a/test/over_react/util/prop_conversion_test.dart +++ b/test/over_react/util/prop_conversion_test.dart @@ -1083,9 +1083,9 @@ main() { // DDC error message matches(RegExp( r"Expected a value of type 'Map[^']*', but got one of type '(Native|Legacy)JavaScriptObject'")), - // dart2js error message + // Dart 2 dart2js, Dart 3 DDC error message matches(RegExp( - r"type '(Unknown|Plain)JavaScriptObject' is not a subtype of type 'Map[^']*'")), + r"type '(Unknown|Plain|Legacy)JavaScriptObject' is not a subtype of type 'Map[^']*'")), )), ]);