Skip to content

Commit c812a62

Browse files
author
Jonah Williams
authored
allow ignoring toString, hashCode, and == in api_conform_test (flutter#13907)
1 parent 7cd3e29 commit c812a62

File tree

3 files changed

+10
-33
lines changed

3 files changed

+10
-33
lines changed

lib/web_ui/lib/src/ui/painting.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,15 +1480,6 @@ abstract class ColorFilter {
14801480
List<dynamic> webOnlySerializeToCssPaint() {
14811481
throw UnsupportedError('ColorFilter for CSS paint not yet supported');
14821482
}
1483-
1484-
@override
1485-
bool operator ==(dynamic other);
1486-
1487-
@override
1488-
int get hashCode;
1489-
1490-
@override
1491-
String toString();
14921483
}
14931484

14941485
/// Styles to use for blurs in [MaskFilter] objects.

lib/web_ui/lib/src/ui/text.dart

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,6 @@ abstract class TextStyle {
472472
List<Shadow> shadows,
473473
List<FontFeature> fontFeatures,
474474
}) = engine.EngineTextStyle;
475-
476-
@override
477-
int get hashCode;
478-
479-
@override
480-
bool operator ==(dynamic other);
481-
482-
@override
483-
String toString();
484475
}
485476

486477
/// An opaque object that determines the configuration used by
@@ -553,15 +544,6 @@ abstract class ParagraphStyle {
553544
String ellipsis,
554545
Locale locale,
555546
}) = engine.EngineParagraphStyle;
556-
557-
@override
558-
bool operator ==(dynamic other);
559-
560-
@override
561-
int get hashCode;
562-
563-
@override
564-
String toString();
565547
}
566548

567549
abstract class StrutStyle {
@@ -610,12 +592,6 @@ abstract class StrutStyle {
610592
FontStyle fontStyle,
611593
bool forceStrutHeight,
612594
}) = engine.EngineStrutStyle;
613-
614-
@override
615-
int get hashCode;
616-
617-
@override
618-
bool operator ==(dynamic other);
619595
}
620596

621597
/// A direction in which text flows.

web_sdk/test/api_conform_test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import 'dart:io';
66

77
import 'package:analyzer/analyzer.dart';
88

9+
// Ignore members defined on Object.
10+
const Set<String> _kObjectMembers = <String>{
11+
'==',
12+
'toString',
13+
'hashCode',
14+
};
15+
916
void main() {
1017
// These files just contain imports to the part files;
1118
final CompilationUnit uiUnit = parseDartFile('lib/ui/ui.dart',
@@ -105,6 +112,9 @@ void main() {
105112
}
106113

107114
for (String methodName in uiMethods.keys) {
115+
if (_kObjectMembers.contains(methodName)) {
116+
continue;
117+
}
108118
final MethodDeclaration uiMethod = uiMethods[methodName];
109119
final MethodDeclaration webMethod = webMethods[methodName];
110120
if (webMethod == null) {

0 commit comments

Comments
 (0)