Page MenuHomePhabricator

Add a linter to enfore unit tests file name/boost name match and unicity
ClosedPublic

Authored by Fabien on Sat, Feb 9, 08:36.

Details

Summary

This linter will warn if:

  • The BOOST_FIXTURE_TEST_SUITE name does not match the file name
  • The test name is not unique

Also add an entry in the dev notes.

Based on core PR12719 and PR12859

Test Plan

Should return nothing:

./test/lint/lint-tests.sh

Rename the BOOST_FIXTURE_TEST_SUITE name in
src/wallet/test/wallet_crypto_tests.cpp to crypto_tests.

./test/lint/lint-tests.sh

Check the mismatch and the duplicata are detected

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Sat, Feb 9, 08:36
Herald added a reviewer: Restricted Project. · View Herald TranscriptSat, Feb 9, 08:36
Herald added a subscriber: schancel. · View Herald Transcript
deadalnix accepted this revision.Sat, Feb 9, 16:29
This revision is now accepted and ready to land.Sat, Feb 9, 16:29
Closed by commit rABCf952a1b9bf84: Add a linter to enfore unit tests file name/boost name match and unicity (authored by practicalswift <practicalswift@users.noreply.github.com>, committed by Fabien). · Explain WhySun, Feb 10, 09:55
This revision was automatically updated to reflect the committed changes.