Skip to content

Commit

Permalink
Add nice license headers to files in examples/ and fuzzing/
Browse files Browse the repository at this point in the history
Related to #2730
  • Loading branch information
horenmar committed Aug 24, 2023
1 parent 5bba3e4 commit 85eb465
Show file tree
Hide file tree
Showing 21 changed files with 152 additions and 4 deletions.
8 changes: 8 additions & 0 deletions examples/010-TestCase.cpp
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 8 additions & 0 deletions examples/020-TestCase-1.cpp
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 8 additions & 0 deletions examples/020-TestCase-2.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 8 additions & 0 deletions examples/030-Asn-Require-Check.cpp
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 8 additions & 0 deletions examples/100-Fix-Section.cpp
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 8 additions & 0 deletions examples/110-Fix-ClassFixture.cpp
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 8 additions & 0 deletions examples/120-Bdd-ScenarioGivenWhenThen.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions examples/210-Evt-EventListeners.cpp
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 8 additions & 0 deletions examples/231-Cfg-OutputStreams.cpp
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
8 changes: 8 additions & 0 deletions examples/300-Gen-OwnGenerator.cpp
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
8 changes: 8 additions & 0 deletions examples/301-Gen-MapTypeConversion.cpp
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
8 changes: 8 additions & 0 deletions examples/302-Gen-Table.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 8 additions & 0 deletions examples/310-Gen-VariablesInGenerators.cpp
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
8 changes: 8 additions & 0 deletions examples/311-Gen-CustomCapture.cpp
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 8 additions & 0 deletions fuzzing/NullOStream.cpp
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
8 changes: 8 additions & 0 deletions fuzzing/NullOStream.h
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 7 additions & 1 deletion fuzzing/fuzz_TestSpecParser.cpp
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 7 additions & 1 deletion fuzzing/fuzz_XmlWriter.cpp
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 7 additions & 1 deletion fuzzing/fuzz_textflow.cpp
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
3 changes: 2 additions & 1 deletion tools/scripts/checkLicense.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions tools/scripts/generateAmalgamatedFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# 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
Expand Down

0 comments on commit 85eb465

Please sign in to comment.