Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Jul 7, 2020

Description

This is one of 3 PRs to complete the line break algorithm:

  1. [THIS] Add the first batch of auto-generated (already passing) tests.
  2. [COMPLETE] Implement the algorithm and add more test cases ([web][2/3] Implement rules of the line break algorithm #19610).
  3. [COMPLETE] Fix surrogates and add the last batch of test cases ([web][3/3] Handle surrogate during line break detection #19745).

Related Issues

flutter/flutter#45932

Tests

I added the following tests:

  • test/text/line_breaker_test.dart

@mdebbar mdebbar added the platform-web Code specifically for the web engine label Jul 7, 2020
@mdebbar mdebbar requested review from ferhatb and yjbanov July 7, 2020 18:49
@mdebbar mdebbar self-assigned this Jul 7, 2020
@mdebbar mdebbar changed the title [web] Start first batch of auto-generated (already passing) tests for line break [WIP][web] Start first batch of auto-generated (already passing) tests for line break Jul 7, 2020
@mdebbar
Copy link
Contributor Author

mdebbar commented Jul 7, 2020

Please hold off reviewing this PR. I made a mistake and put too many test cases (including ones that are still failing).

@mdebbar mdebbar changed the title [WIP][web] Start first batch of auto-generated (already passing) tests for line break [web] Start first batch of auto-generated (already passing) tests for line break Jul 7, 2020
@mdebbar mdebbar changed the title [web] Start first batch of auto-generated (already passing) tests for line break [web][1/3] Start first batch of auto-generated (already passing) tests for line break Jul 7, 2020
Copy link
Contributor

@ferhatb ferhatb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit otherwise lgtm

/// - https://www.unicode.org/Public/13.0.0/ucd/auxiliary/LineBreakTest.txt
final List<TestCase> data = _rawData.map(_parse).toList();

final RegExp sp = RegExp(r'\s+');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: name space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mdebbar
Copy link
Contributor Author

mdebbar commented Jul 8, 2020

Failures are unrelated to this PR. Merging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants