allow ignoring toString, hashCode, and == in api_conform_test (flutter/engine#13907)

This commit is contained in:
Jonah Williams
2019-11-19 10:21:31 -08:00
committed by GitHub
parent 3e412ce43a
commit fb6777923d
3 changed files with 10 additions and 33 deletions

View File

@@ -1480,15 +1480,6 @@ abstract class ColorFilter {
List<dynamic> 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.

View File

@@ -472,15 +472,6 @@ abstract class TextStyle {
List<Shadow> shadows,
List<FontFeature> 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.

View File

@@ -6,6 +6,13 @@ import 'dart:io';
import 'package:analyzer/analyzer.dart';
// Ignore members defined on Object.
const Set<String> _kObjectMembers = <String>{
'==',
'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) {