Skip to content

Commit f3502d1

Browse files
committed
Update to ApprovalTests.cpp v.10.12.2
1 parent ee2fdef commit f3502d1

3 files changed

Lines changed: 29 additions & 10 deletions

File tree

lib/ApprovalTests.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#include "ApprovalTests.v.10.12.1.hpp"
1+
#include "ApprovalTests.v.10.12.2.hpp"
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// ApprovalTests.cpp version v.10.12.1
1+
// ApprovalTests.cpp version v.10.12.2
22
// More information at: https://github.com/approvals/ApprovalTests.cpp
33
//
4-
// Copyright (c) 2021 Llewellyn Falco and Clare Macrae. All rights reserved.
4+
// Copyright (c) 2022 Llewellyn Falco and Clare Macrae. All rights reserved.
55
//
66
// Distributed under the Apache 2.0 License
77
// See https://opensource.org/licenses/Apache-2.0
@@ -27,8 +27,8 @@
2727

2828
#define APPROVAL_TESTS_VERSION_MAJOR 10
2929
#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"
3232

3333
#define APPROVAL_TESTS_VERSION \
3434
(APPROVAL_TESTS_VERSION_MAJOR * 10000 + APPROVAL_TESTS_VERSION_MINOR * 100 + \
@@ -1381,6 +1381,10 @@ namespace ApprovalTests
13811381
public:
13821382
explicit ExistingFileNamer(std::string filePath_, const Options& options);
13831383

1384+
ExistingFileNamer(const ExistingFileNamer& x);
1385+
1386+
ExistingFileNamer(ExistingFileNamer&& x) noexcept;
1387+
13841388
virtual std::string getApprovedFile(std::string extensionWithDot) const override;
13851389

13861390
virtual std::string
@@ -4238,6 +4242,16 @@ namespace ApprovalTests
42384242
{
42394243
}
42404244

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+
42414255
std::string ExistingFileNamer::getApprovedFile(std::string extensionWithDot) const
42424256
{
42434257
return options_.getNamer()->getApprovedFile(extensionWithDot);
@@ -4491,12 +4505,17 @@ namespace ApprovalTests
44914505

44924506
namespace ApprovalTests
44934507
{
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+
44974516
SeparateApprovedAndReceivedDirectoriesNamer::
44984517
SeparateApprovedAndReceivedDirectoriesNamer()
4499-
: TemplatedCustomNamer(path)
4518+
: TemplatedCustomNamer(separateDirectoryPath())
45004519
{
45014520
}
45024521

visual-studio-2019/StarterProject2019.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<ItemGroup>
146146
<ClInclude Include="..\code\YourCodeGoesHere.h" />
147147
<ClInclude Include="..\lib\ApprovalTests.hpp" />
148-
<ClInclude Include="..\lib\ApprovalTests.v.10.12.1.hpp" />
148+
<ClInclude Include="..\lib\ApprovalTests.v.10.12.2.hpp" />
149149
<ClInclude Include="..\lib\catch2\include\catch2\catch.hpp" />
150150
<ClInclude Include="..\lib\catch2\include\catch2\catch.v2.11.0.hpp" />
151151
</ItemGroup>

0 commit comments

Comments
 (0)