Skip to content

Conversation

@EricW123
Copy link
Contributor

@EricW123 EricW123 commented Nov 8, 2025

Refs #676

This PR refactors RemoveHyphenatedNewlinesFormatterTest, TrimWhitespaceFormatterTest, UnicodeConverterTest and UnitsToLatexFormatterTest to use parameterized tests (@CsvSource and @valuesource) following the one-assertion-per-test guideline.

Note: My classmates are also contributing to this issue.

@espertusnu

How to test:

./gradlew :jablib:test \
    --tests org.jabref.logic.formatter.bibtexfields.TrimWhitespaceFormatterTest \
    --tests org.jabref.logic.formatter.bibtexfields.UnicodeConverterTest \
    --tests org.jabref.logic.formatter.bibtexfields.UnitsToLatexFormatterTest \
    --tests org.jabref.logic.formatter.bibtexfields.RemoveHyphenatedNewlinesFormatterTest

koppor
koppor previously requested changes Nov 11, 2025
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Plesae use text blocks

Comment on lines 29 to 35
// combining accents
"{\\\"{a}}, a\u0308",
"{\\\"{a}}b, a\u0308b",

// plain unicode letters
"{\\\"{a}}, ä",
"{{$\\Epsilon$}}, \u0395"
Copy link
Member

Choose a reason for hiding this comment

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

Please use text blocks here. See https://devdocs.jabref.org/code-howtos/testing.html#use-paramterizedtests for an example, Youc an use , as delimiter.

@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Nov 11, 2025
@koppor koppor added the dev: testing Related to tests label Nov 11, 2025
@koppor
Copy link
Member

koppor commented Nov 13, 2025

@EricW123 Thank you for working on this - maybe, you can get inspiration of your classmate's work? -- #14126

…ue676

* upstream/main: (227 commits)
  Adapt welcome message (JabRef#14487)
  Add message when closing a PR
  Add collection of "all" AI features (JabRef#14438)
  Trigger conflict-detection on push on main (JabRef#14479)
  Add unassigned_comment on comment issue
  New Crowdin updates (JabRef#14483)
  Tweak labels also at merge conflicts
  Merge --remove-label and --add-label
  Remove SmartGroup and refactor groups factory (JabRef#14398)
  more debug
  Support html when parsing arXiv identifiers (JabRef#14474)
  Add debug and fix run
  Remove "ready-for-review" if changes are required
  Have label move as last step of comment
  Add pr number to output
  change files to file(s) (JabRef#14465)
  Add CDS archive (JabRef#14476)
  Fix adapting labels (JabRef#14477)
  Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#14468)
  Chore(deps): Bump net.bytebuddy:byte-buddy in /versions (JabRef#14472)
  ...
@Siedlerchr Siedlerchr added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels Dec 1, 2025
@Siedlerchr Siedlerchr enabled auto-merge December 1, 2025 20:54
@Siedlerchr Siedlerchr added this pull request to the merge queue Dec 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 1, 2025
@Siedlerchr Siedlerchr merged commit c85bca4 into JabRef:main Dec 1, 2025
52 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev: testing Related to tests status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants