Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

develroot / tests / Progmasoft / BUILD.bazel

1.5 KiB · Raw · Log

# Copyright (c) 2026 Progmasoft.
# SPDX-License-Identifier: LGPL-3.0-or-later
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")

package(default_visibility = ["//visibility:public"])

cc_test(
    name = "property_tests",
    srcs = [
        "ForAll.tests.cpp",
        "Generators.tests.cpp",
        "Mock.tests.cpp",
        "Property.tests.cpp",
        "Results.tests.cpp",
        "Runner.tests.cpp",
        "RunnerFixtureClient.hpp",
        "RunnerUnits.tests.cpp",
        "RunnerPlanner.tests.cpp",
        "RunnerOptions.tests.cpp",
        "RunnerConfig.tests.cpp",
        "RunnerAnalysis.tests.cpp",
        "RunnerImport.tests.cpp",
        "RunnerCoverage.tests.cpp",
        "RunnerOutput.tests.cpp",
        "Snapshot.tests.cpp",
        "Stateful.tests.cpp",
        "Strategy.tests.cpp",
    ],
    copts = select({
        "@platforms//os:windows": ["/std:c++17"],
        "//conditions:default": ["-std=c++17"],
    }),
    args = ["--no-history"],
    data = [":runner_fixture"],
    env = {"CATCH3_RUNNER_FIXTURE": "$(rootpath :runner_fixture)"},
    deps = [
        "//:catch3",
        "//:catch3_main",
    ],
)

# Tests that misbehave on purpose, for the runner's integration tests.
cc_binary(
    name = "runner_fixture",
    srcs = ["RunnerFixture.cpp"],
    copts = select({
        "@platforms//os:windows": ["/std:c++17"],
        "//conditions:default": ["-std=c++17"],
    }),
    deps = [
        "//:catch3",
        "//:catch3_main",
    ],
)