diff options
| author | Leitwolf11 | 2026-11-01 22:05:27 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-01 22:05:27 +0300 |
| commit | 241b5567d09d59e82bff18287c32ada480deb8c0 (patch) | |
| tree | 24bb446828301b1fdfb60ceef08c2a8fec23ab3e /tools | |
| parent | 5cbd481125b881a4c2eed74050be9899eb3f23a7 (diff) | |
| download | catch3-241b5567d09d59e82bff18287c32ada480deb8c0.tar.gz | |
Carry mocks in the amalgamated files
Mock.hpp goes into catch_amalgamated.hpp, since tests use it directly, and
Mock.cpp into catch_amalgamated.cpp. The test of the amalgamated files
now uses a mock, so a file left out fails it.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/scripts/generateAmalgamatedFiles.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index c927c75b..dcf78080 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -155,6 +155,8 @@ def generate_header(): header.write('#ifndef CATCH_AMALGAMATED_HPP_INCLUDED\n') header.write('#define CATCH_AMALGAMATED_HPP_INCLUDED\n') print('Concatenated {} headers'.format(concatenate_file(header, starting_header, True))) + # Mocks are Progmasoft's own, and tests use them through this header. + concatenate_file(header, os.path.join(root_path, 'Progmasoft', 'Catch3', 'Mock.hpp'), True) header.write('#endif // CATCH_AMALGAMATED_HPP_INCLUDED\n') # The runner's files include each other as <Progmasoft/...> or, inside one @@ -259,7 +261,8 @@ def generate_cpp(): runner_headers = sorted(glob(os.path.join(root_path, 'Progmasoft', 'Runner', '*.hpp'))) + [ os.path.join(root_path, 'Progmasoft', 'Catch3', name) for name in ('Results.hpp', 'Runner.hpp', 'Version.hpp', 'XmlWriter.hpp')] - runner_files = [os.path.join(root_path, 'Progmasoft', 'Results.cpp'), + runner_files = [os.path.join(root_path, 'Progmasoft', 'Mock.cpp'), + os.path.join(root_path, 'Progmasoft', 'Results.cpp'), os.path.join(root_path, 'Progmasoft', 'XmlWriter.cpp')] + \ sorted(glob(os.path.join(root_path, 'Progmasoft', 'Runner', '*.cpp'))) with open(output_cpp, mode='w', encoding='utf-8') as cpp: |