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

tests: simplify some string utilities tests #658

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

midgleyc
Copy link
Member

Some comments I had on #616, implemented.

  • replace char[] with String
  • remove the explicit catch-failure on exceptions, and just let them be thrown to fail the test
  • use List.of for expected

@midgleyc midgleyc requested a review from a team as a code owner March 15, 2022 20:50
@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #658 (1bf1d0a) into main (1897d5e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #658   +/-   ##
=========================================
  Coverage     21.77%   21.77%           
  Complexity     9369     9369           
=========================================
  Files          1003     1003           
  Lines        157070   157070           
  Branches      34819    34819           
=========================================
  Hits          34208    34208           
  Misses       116590   116590           
  Partials       6272     6272           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1897d5e...1bf1d0a. Read the comment docs.

@jaadams5
Copy link
Contributor

Some comments I had on #616, implemented.

  • replace char[] with String

I deliberately did not do that because "your way" on my system created a failing test and reduced coverage. Since this doesn't do either of those, I must have misunderstood "your way".

  • remove the explicit catch-failure on exceptions, and just let them be thrown to fail the test

I chose not to do this because I think the other implementation was easier to quickly read and understand what the test was, and was not doing, but not worth arguing over a preference.

  • use List.of for expected

Whoops. I either missed some or something got lost in conflict resolution. Thanks.

@midgleyc midgleyc merged commit 4c22f79 into kolmafia:main Mar 15, 2022
@midgleyc midgleyc deleted the string-utils-test-suggestions branch March 15, 2022 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants