Skip to content

tests: switch from GTest to Catch2 - #574

Merged
henryiii merged 4 commits into
masterfrom
fix/ci
Apr 4, 2021
Merged

henryiii merged 4 commits into
masterfrom
fix/ci

Conversation

@henryiii

@henryiii henryiii commented Apr 3, 2021 •

Copy link
Copy Markdown
Collaborator

Finally dumping GTest. There are lots of reasons, such as

  • Better compiler support. GTest has killed off GCC 4.8 (CentOS 7, manylinux1). I already had to drop GCC 4.7 support due to GTest, not doing it again. (Not that anyone cared about 4.7. 4.8 though, is a major one). Clang <5 also was dropped by GTest. Also GTest doesn’t seem to handle C++20.
  • Better support. Catch2 (and probably doctest) respond to user issues faster, GTest is a bit internal to Google. (Better than it used to be)
  • Real versions, and changelog. Live at HEAD is fine, but should not be forced, and changelogs let you track what happens from a high level.
  • Simpler tests. Boilerplate things (templates, repeated code, generation) are simpler, and look prettier too.
  • Matchers built-in, instead of requiring GoogleMock, which is an extra pain (this is a key reason as to why why I'm going with Catch2 over doctest).
  • More powerful runner if we do want to use it.
  • Nicer output.

Caught a few minor issues in the tests, like a duplicated type in the type parametrization. Much of the conversion done by https://gist.github.com/henryiii/7dc93c6bd8404b346daa2647e72fbd55, based on https://anteru.net/blog/2017/from-google-test-to-catch/.

Fixing the CMake config check by using an action + composite action instead of docker.

@henryiii
henryiii force-pushed the fix/ci branch 6 times, most recently from 5e7c6a5 to 1e10c81 Compare April 4, 2021 02:57
@henryiii henryiii changed the title tests: Switch from GTest to Catch2 tests: switch from GTest to Catch2 Apr 4, 2021
@codecov

codecov Bot commented Apr 4, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #574 (d44cf04) into master (34c4310) will not change coverage.
The diff coverage is n/a.

❗ Current head d44cf04 differs from pull request most recent head 73ce349. Consider uploading reports for the commit 73ce349 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master      #574   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines         3780      3780           
=========================================
  Hits          3780      3780           

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 34c4310...73ce349. Read the comment docs.

@henryiii
henryiii merged commit fa423c4 into master Apr 4, 2021
@henryiii
henryiii deleted the fix/ci branch April 4, 2021 04:29
@github-actions github-actions Bot added needs changelog Hasn't been added to the changelog yet needs README Needs to be mentioned in the README labels Apr 4, 2021
@henryiii henryiii mentioned this pull request Apr 4, 2021
3 tasks done
@henryiii henryiii removed needs README Needs to be mentioned in the README needs changelog Hasn't been added to the changelog yet labels Apr 8, 2021
@henryiii henryiii added this to the v2.0 milestone Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant