Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FindMatches class test with segmented #1188

Merged

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Nov 16, 2024

FindMatches class ctor has a argument of boolean allowSeparateSegmentMatch.
This PR add a test case with the option and test the chunk of the feature.

Pull request type

  • Other (describe below)
    Improve test coverage, Quality Assurance

What does this PR change?

  • ProjectTMX: change a scope of defaults and alternatives fields as protected for mocking
  • ProjectTMXTest: update TestProject internal class
  • ProjectTMXTest: add the case testSegmented
  • calcMatchStatisticsTest to handle Segmenter and TestProject
  • update SegmenterTest
  • refactor FindMatches, CalcMatchStatistics, ExternalTMFactory, and ProjectTMX.

Other information

- The mock project can process ProjectTMX
- implement iterateBy*Translations methods
- Ctor accept project TMX file and exernal TMX file.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
- the case FindMatches.search with allowSeparateSegmentMatch

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
…nd FindMatches

- To test these classes, add ctor which accept Segmenter, FilterMaster as argument
- It separates these classes from Core static context

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@omegat-org omegat-org deleted a comment from github-actions bot Nov 16, 2024
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@omegat-org omegat-org deleted a comment from github-actions bot Nov 16, 2024
- It interference with FindMatchesTest

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@omegat-org omegat-org deleted a comment from github-actions bot Nov 16, 2024
@miurahr miurahr merged commit e4a33b2 into master Nov 17, 2024
13 checks passed
@miurahr miurahr deleted the topic/miurahr/statistics/refactor-findmatches-segmented branch November 17, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant