Add nice license headers to files in examples/ and fuzzing/

Related to #2730
This commit is contained in:
Martin Hořeňovský 2023-08-24 16:33:15 +02:00
parent 5bba3e4038
commit 85eb4652b4
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
21 changed files with 152 additions and 4 deletions

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 010-TestCase.cpp
// And write tests in the same file:
#include <catch2/catch_test_macros.hpp>

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 020-TestCase-1.cpp
#include <catch2/catch_test_macros.hpp>

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 020-TestCase-2.cpp
// main() provided by Catch in file 020-TestCase-1.cpp.

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 030-Asn-Require-Check.cpp
// Catch has two natural expression assertion macro's:

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 100-Fix-Section.cpp
// Catch has two ways to express fixtures:

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 110-Fix-ClassFixture.cpp
// Catch has two ways to express fixtures:

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 120-Bdd-ScenarioGivenWhenThen.cpp
// main() provided by linkage with Catch2WithMain

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 210-Evt-EventListeners.cpp
// Contents:

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 231-Cfg-OutputStreams.cpp
// Show how to replace the streams with a simple custom made streambuf.

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 300-Gen-OwnGenerator.cpp
// Shows how to define a custom generator.

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 301-Gen-MapTypeConversion.cpp
// Shows how to use map to modify generator's return type.

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 302-Gen-Table.cpp
// Shows how to use table to run a test many times with different inputs. Lifted from examples on
// issue #850.

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 310-Gen-VariablesInGenerator.cpp
// Shows how to use variables when creating generators.

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// 311-Gen-CustomCapture.cpp
// Shows how to provide custom capture list to the generator expression

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#include "NullOStream.h"
void NullOStream::avoidOutOfLineVirtualCompilerWarning()

View File

@ -1,3 +1,11 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#pragma once
#include <ostream>

View File

@ -1,4 +1,10 @@
//License: Boost 1.0
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
//By Paul Dreik 2020
#include <catch2/internal/catch_test_spec_parser.hpp>

View File

@ -1,4 +1,10 @@
//License: Boost 1.0
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
//By Paul Dreik 2020
#include <catch2/internal/catch_xmlwriter.hpp>

View File

@ -1,4 +1,10 @@
//License: Boost 1.0
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
//By Paul Dreik 2020
#include <catch2/internal/catch_textflow.hpp>

View File

@ -33,7 +33,8 @@ def check_licences_in_path(path: str) -> int:
def check_licences():
failed = 0
roots = ['src/catch2', 'tests']
# Add 'extras' after the amalgamted files are regenerated with the new script (past 3.4.0)
roots = ['src/catch2', 'tests', 'examples', 'fuzzing']
for root in roots:
failed += check_licences_in_path(root)

View File

@ -31,6 +31,7 @@ copyright_lines = [
# The header of the amalgamated file: copyright information + explanation
# what this file is.
file_header = '''\
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at