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

Refactor XMLTester #1230

Merged
merged 15 commits into from
Jan 28, 2025
Merged

Refactor XMLTester #1230

merged 15 commits into from
Jan 28, 2025

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Jan 22, 2025

Improves XMLTester by modularizing it using an additional Test class and a few lambda functions. This allows factoring out common code to achieve DRY.

  • improves maintainability
  • easier to add new operations
  • reduces risk of ops missing expected behaviour (e.g. swapping A and B args, test reporting)
  • reduces code size (> 800 lines removed)
  • adds test file line number reporting

This has also uncovered some issues with result testing (in particular, using topological rather than exact equals). Fixing this requires fixing a few tests, so will be done in a subsequent PR.

@dr-jts dr-jts added the Enhancement New feature or feature improvement. label Jan 22, 2025
@dr-jts dr-jts changed the title Modularize XMLTester Refactor XMLTester Jan 22, 2025
@dr-jts dr-jts requested review from pramsey and dbaston January 22, 2025 16:10
@dr-jts dr-jts marked this pull request as draft January 22, 2025 19:00
@dr-jts dr-jts marked this pull request as ready for review January 22, 2025 23:56
@dr-jts dr-jts merged commit e6e5fd7 into libgeos:main Jan 28, 2025
29 of 30 checks passed
@dr-jts dr-jts deleted the improve-xmltester branch January 28, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or feature improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants