Skip to content

Commit

Permalink
Fix api conformance check (flutter#8817)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams authored May 2, 2019
1 parent 30639ee commit c0be4e2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
8 changes: 8 additions & 0 deletions lib/stub_ui/lib/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,14 @@ class Paragraph {
List<int> getWordBoundary(int offset) {
throw UnimplementedError();
}

/// The distance from the left edge of the leftmost glyph to the right edge of
/// the rightmost glyph in the paragraph.
///
/// Valid only after [layout] has been called.
double get longestLine {
throw UnimplementedError();
}
}

/// Builds a [Paragraph] containing text with the given styling information.
Expand Down
9 changes: 9 additions & 0 deletions lib/stub_ui/lib/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,15 @@ class Locale {
out.write('_$countryCode');
return out.toString();
}

/// Returns a syntactically valid Unicode BCP47 Locale Identifier.
///
/// Some examples of such identifiers: "en", "es-419", "hi-Deva-IN" and
/// "zh-Hans-CN". See http://www.unicode.org/reports/tr35/ for technical
/// details.
String toLanguageTag() {
throw UnimplementedError();
}
}

/// The most basic interface to the host operating system's user interface.
Expand Down
8 changes: 5 additions & 3 deletions web_sdk/test/api_conform_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';

import 'package:analyzer/analyzer.dart';

int main() {
void main() {
// These files just contain imports to the part files;
final CompilationUnit uiUnit = parseDartFile('lib/ui/ui.dart',
parseFunctionBodies: false, suppressErrors: false);
Expand Down Expand Up @@ -86,10 +88,10 @@ int main() {
}
if (failed) {
print('Failure!');
return 1;
exit(1);
}
print('Success!');
return 0;
exit(0);
}

// Collects all public classes defined by the part files of [unit].
Expand Down

0 comments on commit c0be4e2

Please sign in to comment.