|
1 | | -// ApprovalTests.cpp version v.10.12.1 |
| 1 | +// ApprovalTests.cpp version v.10.12.2 |
2 | 2 | // More information at: https://github.com/approvals/ApprovalTests.cpp |
3 | 3 | // |
4 | | -// Copyright (c) 2021 Llewellyn Falco and Clare Macrae. All rights reserved. |
| 4 | +// Copyright (c) 2022 Llewellyn Falco and Clare Macrae. All rights reserved. |
5 | 5 | // |
6 | 6 | // Distributed under the Apache 2.0 License |
7 | 7 | // See https://opensource.org/licenses/Apache-2.0 |
|
27 | 27 |
|
28 | 28 | #define APPROVAL_TESTS_VERSION_MAJOR 10 |
29 | 29 | #define APPROVAL_TESTS_VERSION_MINOR 12 |
30 | | -#define APPROVAL_TESTS_VERSION_PATCH 1 |
31 | | -#define APPROVAL_TESTS_VERSION_STR "10.12.1" |
| 30 | +#define APPROVAL_TESTS_VERSION_PATCH 2 |
| 31 | +#define APPROVAL_TESTS_VERSION_STR "10.12.2" |
32 | 32 |
|
33 | 33 | #define APPROVAL_TESTS_VERSION \ |
34 | 34 | (APPROVAL_TESTS_VERSION_MAJOR * 10000 + APPROVAL_TESTS_VERSION_MINOR * 100 + \ |
@@ -1381,6 +1381,10 @@ namespace ApprovalTests |
1381 | 1381 | public: |
1382 | 1382 | explicit ExistingFileNamer(std::string filePath_, const Options& options); |
1383 | 1383 |
|
| 1384 | + ExistingFileNamer(const ExistingFileNamer& x); |
| 1385 | + |
| 1386 | + ExistingFileNamer(ExistingFileNamer&& x) noexcept; |
| 1387 | + |
1384 | 1388 | virtual std::string getApprovedFile(std::string extensionWithDot) const override; |
1385 | 1389 |
|
1386 | 1390 | virtual std::string |
@@ -4238,6 +4242,16 @@ namespace ApprovalTests |
4238 | 4242 | { |
4239 | 4243 | } |
4240 | 4244 |
|
| 4245 | + ExistingFileNamer::ExistingFileNamer(const ExistingFileNamer& x) |
| 4246 | + : filePath(x.filePath), options_(x.options_) |
| 4247 | + { |
| 4248 | + } |
| 4249 | + |
| 4250 | + ExistingFileNamer::ExistingFileNamer(ExistingFileNamer&& x) noexcept |
| 4251 | + : filePath(std::move(x.filePath)), options_(x.options_) |
| 4252 | + { |
| 4253 | + } |
| 4254 | + |
4241 | 4255 | std::string ExistingFileNamer::getApprovedFile(std::string extensionWithDot) const |
4242 | 4256 | { |
4243 | 4257 | return options_.getNamer()->getApprovedFile(extensionWithDot); |
@@ -4491,12 +4505,17 @@ namespace ApprovalTests |
4491 | 4505 |
|
4492 | 4506 | namespace ApprovalTests |
4493 | 4507 | { |
4494 | | - // clang-format off |
4495 | | - auto path = "{TestSourceDirectory}/{ApprovalsSubdirectory}/{ApprovedOrReceived}/{TestFileName}.{TestCaseName}.{FileExtension}"; |
4496 | | - // clang-format on |
| 4508 | + std::string separateDirectoryPath() |
| 4509 | + { |
| 4510 | + // clang-format off |
| 4511 | + auto path = "{TestSourceDirectory}/{ApprovalsSubdirectory}/{ApprovedOrReceived}/{TestFileName}.{TestCaseName}.{FileExtension}"; |
| 4512 | + // clang-format on |
| 4513 | + return path; |
| 4514 | + } |
| 4515 | + |
4497 | 4516 | SeparateApprovedAndReceivedDirectoriesNamer:: |
4498 | 4517 | SeparateApprovedAndReceivedDirectoriesNamer() |
4499 | | - : TemplatedCustomNamer(path) |
| 4518 | + : TemplatedCustomNamer(separateDirectoryPath()) |
4500 | 4519 | { |
4501 | 4520 | } |
4502 | 4521 |
|
|
0 commit comments