catchorg / Catch2

A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
https://discord.gg/4CWS9zD
Boost Software License 1.0
18.51k stars 3.04k forks source link

test: add bazel build rule for SelfTest #2857

Closed c8ef closed 5 months ago

c8ef commented 5 months ago

Description

This PR primarily accomplishes two tasks:

  1. It adds MODULE.bazel.lock to the .gitignore file.
  2. It includes a Bazel build rule for SelfTest, which can be utilized with the command bazel test //tests:catch2_self_test.

GitHub Issues

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.09%. Comparing base (53ddf37) to head (31b9a3a). Report is 2 commits behind head on devel.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #2857 +/- ## ======================================= Coverage 91.09% 91.09% ======================================= Files 197 197 Lines 8382 8382 ======================================= Hits 7635 7635 Misses 747 747 ```
horenmar commented 5 months ago

What's the advantage of having SelfTest build rule in repo, when the main development is done using CMake?

c8ef commented 5 months ago

There may not be much advantage, but I noticed the meson build file for the test case. I believe it would be beneficial to have a corresponding Bazel build rule for those using Bazel.

horenmar commented 5 months ago

Fair enough.

c8ef commented 5 months ago

Thanks!