From c812a62b8810091f5be7326374dbeb1432e5353b Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 19 Nov 2019 10:21:31 -0800 Subject: [PATCH] allow ignoring toString, hashCode, and == in api_conform_test (#13907) --- lib/web_ui/lib/src/ui/painting.dart | 9 --------- lib/web_ui/lib/src/ui/text.dart | 24 ------------------------ web_sdk/test/api_conform_test.dart | 10 ++++++++++ 3 files changed, 10 insertions(+), 33 deletions(-) diff --git a/lib/web_ui/lib/src/ui/painting.dart b/lib/web_ui/lib/src/ui/painting.dart index 09a268c97..9a26fc952 100644 --- a/lib/web_ui/lib/src/ui/painting.dart +++ b/lib/web_ui/lib/src/ui/painting.dart @@ -1480,15 +1480,6 @@ abstract class ColorFilter { List webOnlySerializeToCssPaint() { throw UnsupportedError('ColorFilter for CSS paint not yet supported'); } - - @override - bool operator ==(dynamic other); - - @override - int get hashCode; - - @override - String toString(); } /// Styles to use for blurs in [MaskFilter] objects. diff --git a/lib/web_ui/lib/src/ui/text.dart b/lib/web_ui/lib/src/ui/text.dart index f4a798ef4..3e2ad9cd5 100644 --- a/lib/web_ui/lib/src/ui/text.dart +++ b/lib/web_ui/lib/src/ui/text.dart @@ -472,15 +472,6 @@ abstract class TextStyle { List shadows, List fontFeatures, }) = engine.EngineTextStyle; - - @override - int get hashCode; - - @override - bool operator ==(dynamic other); - - @override - String toString(); } /// An opaque object that determines the configuration used by @@ -553,15 +544,6 @@ abstract class ParagraphStyle { String ellipsis, Locale locale, }) = engine.EngineParagraphStyle; - - @override - bool operator ==(dynamic other); - - @override - int get hashCode; - - @override - String toString(); } abstract class StrutStyle { @@ -610,12 +592,6 @@ abstract class StrutStyle { FontStyle fontStyle, bool forceStrutHeight, }) = engine.EngineStrutStyle; - - @override - int get hashCode; - - @override - bool operator ==(dynamic other); } /// A direction in which text flows. diff --git a/web_sdk/test/api_conform_test.dart b/web_sdk/test/api_conform_test.dart index ad0fc1810..63ef0c70c 100644 --- a/web_sdk/test/api_conform_test.dart +++ b/web_sdk/test/api_conform_test.dart @@ -6,6 +6,13 @@ import 'dart:io'; import 'package:analyzer/analyzer.dart'; +// Ignore members defined on Object. +const Set _kObjectMembers = { + '==', + 'toString', + 'hashCode', +}; + void main() { // These files just contain imports to the part files; final CompilationUnit uiUnit = parseDartFile('lib/ui/ui.dart', @@ -105,6 +112,9 @@ void main() { } for (String methodName in uiMethods.keys) { + if (_kObjectMembers.contains(methodName)) { + continue; + } final MethodDeclaration uiMethod = uiMethods[methodName]; final MethodDeclaration webMethod = webMethods[methodName]; if (webMethod == null) { -- GitLab