Skip to content

Commit e3b31cd

Browse files
committed
Merge branch 'single_header_spy'
2 parents f4e6537 + 010bf3c commit e3b31cd

File tree

57 files changed

+885
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+885
-225
lines changed

ApprovalTests/ApprovalTests.hpp

+51-53
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,75 @@
11
#ifndef APPROVALTESTS_CPP_APPROVALS_HPP
22
#define APPROVALTESTS_CPP_APPROVALS_HPP
33

4-
// Created with:
5-
// cd ApprovalTests.cpp
6-
// ./scripts/create_simulated_single_header.sh
4+
// This file is machine-generated. Do not edit.
75

86
#include "ApprovalTests/ApprovalTestsVersion.h"
9-
#include "ApprovalTests/Approvals.h"
10-
#include "ApprovalTests/CombinationApprovals.h"
7+
#include "ApprovalTests/core/Reporter.h"
8+
#include "ApprovalTests/reporters/QuietReporter.h"
9+
#include "ApprovalTests/utilities/Blocker.h"
10+
#include "ApprovalTests/utilities/StringUtils.h"
11+
#include "ApprovalTests/utilities/Macros.h"
12+
#include "ApprovalTests/utilities/WinMinGWUtils.h"
13+
#include "ApprovalTests/core/ApprovalWriter.h"
14+
#include "ApprovalTests/writers/StringWriter.h"
15+
#include "ApprovalTests/utilities/FileUtils.h"
16+
#include "ApprovalTests/utilities/SystemUtils.h"
17+
#include "ApprovalTests/utilities/MachineBlocker.h"
18+
#include "ApprovalTests/utilities/FileUtilsSystemSpecific.h"
19+
#include "ApprovalTests/reporters/AutoApproveReporter.h"
20+
#include "ApprovalTests/namers/HelpMessages.h"
21+
#include "ApprovalTests/core/ApprovalNamer.h"
22+
#include "ApprovalTests/namers/ApprovalTestNamer.h"
23+
#include "ApprovalTests/namers/SectionNameDisposer.h"
24+
#include "ApprovalTests/integrations/google/GoogleCustomizationsFactory.h"
25+
#include "ApprovalTests/utilities/CartesianProduct.h"
26+
#include "ApprovalTests/writers/ExistingFile.h"
27+
#include "ApprovalTests/reporters/ConvertForCygwin.h"
28+
#include "ApprovalTests/reporters/DiffInfo.h"
29+
#include "ApprovalTests/launchers/CommandLauncher.h"
30+
#include "ApprovalTests/reporters/CommandReporter.h"
31+
#include "ApprovalTests/launchers/SystemLauncher.h"
32+
#include "ApprovalTests/reporters/DiffPrograms.h"
33+
#include "ApprovalTests/reporters/GenericDiffReporter.h"
34+
#include "ApprovalTests/reporters/FirstWorkingReporter.h"
35+
#include "ApprovalTests/reporters/LinuxReporters.h"
36+
#include "ApprovalTests/reporters/MacReporters.h"
37+
#include "ApprovalTests/reporters/WindowsReporters.h"
38+
#include "ApprovalTests/reporters/DiffReporter.h"
39+
#include "ApprovalTests/reporters/DefaultReporterFactory.h"
40+
#include "ApprovalTests/reporters/DefaultReporterDisposer.h"
41+
#include "ApprovalTests/reporters/DefaultReporter.h"
42+
#include "ApprovalTests/namers/SubdirectoryDisposer.h"
43+
#include "ApprovalTests/namers/DefaultNamerFactory.h"
44+
#include "ApprovalTests/namers/ExistingFileNamer.h"
45+
#include "ApprovalTests/namers/DefaultNamerDisposer.h"
46+
#include "ApprovalTests/reporters/CustomReporter.h"
47+
#include "ApprovalTests/reporters/TextDiffReporter.h"
48+
#include "ApprovalTests/reporters/CIBuildOnlyReporter.h"
49+
#include "ApprovalTests/reporters/DefaultFrontLoadedReporter.h"
50+
#include "ApprovalTests/reporters/FrontLoadedReporterFactory.h"
51+
#include "ApprovalTests/reporters/FrontLoadedReporterDisposer.h"
52+
#include "ApprovalTests/core/ApprovalException.h"
53+
#include "ApprovalTests/core/ApprovalComparator.h"
54+
#include "ApprovalTests/comparators/TextFileComparator.h"
1155
#include "ApprovalTests/comparators/ComparatorDisposer.h"
1256
#include "ApprovalTests/comparators/ComparatorFactory.h"
13-
#include "ApprovalTests/comparators/TextFileComparator.h"
14-
#include "ApprovalTests/core/ApprovalComparator.h"
15-
#include "ApprovalTests/core/ApprovalException.h"
16-
#include "ApprovalTests/core/ApprovalNamer.h"
17-
#include "ApprovalTests/core/ApprovalWriter.h"
1857
#include "ApprovalTests/core/FileApprover.h"
19-
#include "ApprovalTests/core/Reporter.h"
58+
#include "ApprovalTests/Approvals.h"
59+
#include "ApprovalTests/CombinationApprovals.h"
2060
#include "ApprovalTests/integrations/CheckFileMacroIsAbsolute.h"
2161
#include "ApprovalTests/integrations/catch/Catch2Approvals.h"
2262
#include "ApprovalTests/integrations/doctest/DocTestApprovals.h"
2363
#include "ApprovalTests/integrations/google/GoogleConfiguration.h"
24-
#include "ApprovalTests/integrations/google/GoogleCustomizationsFactory.h"
2564
#include "ApprovalTests/integrations/google/GoogleTestApprovals.h"
2665
#include "ApprovalTests/integrations/ut/UTApprovals.h"
27-
#include "ApprovalTests/launchers/CommandLauncher.h"
28-
#include "ApprovalTests/launchers/SystemLauncher.h"
29-
#include "ApprovalTests/namers/ApprovalTestNamer.h"
30-
#include "ApprovalTests/namers/DefaultNamerDisposer.h"
31-
#include "ApprovalTests/namers/DefaultNamerFactory.h"
32-
#include "ApprovalTests/namers/ExistingFileNamer.h"
33-
#include "ApprovalTests/namers/HelpMessages.h"
3466
#include "ApprovalTests/namers/NamerFactory.h"
35-
#include "ApprovalTests/namers/SectionNameDisposer.h"
3667
#include "ApprovalTests/namers/SeparateApprovedAndReceivedDirectoriesNamer.h"
37-
#include "ApprovalTests/namers/SubdirectoryDisposer.h"
3868
#include "ApprovalTests/reporters/AutoApproveIfMissingReporter.h"
39-
#include "ApprovalTests/reporters/AutoApproveReporter.h"
4069
#include "ApprovalTests/reporters/BlockingReporter.h"
41-
#include "ApprovalTests/reporters/CIBuildOnlyReporter.h"
4270
#include "ApprovalTests/reporters/CIBuildOnlyReporterUtils.h"
4371
#include "ApprovalTests/reporters/ClipboardReporter.h"
4472
#include "ApprovalTests/reporters/CombinationReporter.h"
45-
#include "ApprovalTests/reporters/CommandReporter.h"
46-
#include "ApprovalTests/reporters/ConvertForCygwin.h"
47-
#include "ApprovalTests/reporters/CustomReporter.h"
48-
#include "ApprovalTests/reporters/DefaultFrontLoadedReporter.h"
49-
#include "ApprovalTests/reporters/DefaultReporter.h"
50-
#include "ApprovalTests/reporters/DefaultReporterDisposer.h"
51-
#include "ApprovalTests/reporters/DefaultReporterFactory.h"
52-
#include "ApprovalTests/reporters/DiffInfo.h"
53-
#include "ApprovalTests/reporters/DiffPrograms.h"
54-
#include "ApprovalTests/reporters/DiffReporter.h"
55-
#include "ApprovalTests/reporters/FirstWorkingReporter.h"
56-
#include "ApprovalTests/reporters/FrontLoadedReporterDisposer.h"
57-
#include "ApprovalTests/reporters/FrontLoadedReporterFactory.h"
58-
#include "ApprovalTests/reporters/GenericDiffReporter.h"
59-
#include "ApprovalTests/reporters/LinuxReporters.h"
60-
#include "ApprovalTests/reporters/MacReporters.h"
61-
#include "ApprovalTests/reporters/QuietReporter.h"
62-
#include "ApprovalTests/reporters/TextDiffReporter.h"
63-
#include "ApprovalTests/reporters/WindowsReporters.h"
64-
#include "ApprovalTests/utilities/Blocker.h"
65-
#include "ApprovalTests/utilities/CartesianProduct.h"
6673
#include "ApprovalTests/utilities/ExceptionCollector.h"
67-
#include "ApprovalTests/utilities/FileUtils.h"
68-
#include "ApprovalTests/utilities/FileUtilsSystemSpecific.h"
69-
#include "ApprovalTests/utilities/MachineBlocker.h"
70-
#include "ApprovalTests/utilities/Macros.h"
71-
#include "ApprovalTests/utilities/StringUtils.h"
72-
#include "ApprovalTests/utilities/SystemUtils.h"
73-
#include "ApprovalTests/utilities/WinMinGWUtils.h"
74-
#include "ApprovalTests/writers/ExistingFile.h"
75-
#include "ApprovalTests/writers/StringWriter.h"
7674

7775
#endif // APPROVALTESTS_CPP_APPROVALS_HPP

ApprovalTests/Approvals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,4 @@ namespace ApprovalTests
197197
};
198198
}
199199

200-
#endif
200+
#endif // APPROVALTESTS_CPP_APPROVALS_H

ApprovalTests/CombinationApprovals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ namespace ApprovalTests
6767
} // namespace CombinationApprovals
6868
} // namespace ApprovalTests
6969

70-
#endif
70+
#endif // APPROVALTESTS_CPP_COMBINATIONAPPROVALS_H

ApprovalTests/core/ApprovalException.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ namespace ApprovalTests
6565
};
6666
}
6767

68-
#endif
68+
#endif // APPROVALTESTS_CPP_APPROVALEXCEPTION_H

ApprovalTests/core/ApprovalNamer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ namespace ApprovalTests
1414
};
1515
}
1616

17-
#endif
17+
#endif // APPROVALTESTS_CPP_APPROVALNAMER_H

ApprovalTests/core/FileApprover.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ namespace ApprovalTests
8989
};
9090
}
9191

92-
#endif
92+
#endif // APPROVALTESTS_CPP_FILEAPPROVER_H

ApprovalTests/core/Reporter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ namespace ApprovalTests
2727
} // namespace Detail
2828
}
2929

30-
#endif
30+
#endif // APPROVALTESTS_CPP_REPORTER_H

ApprovalTests/integrations/CheckFileMacroIsAbsolute.h

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// Maintenance note: the following help message must be short, and
55
// not contain any newline characters, as their display looks messy
66
// in some compiler outputs.
7-
// <SingleHpp unalterable>
87
//
98
// This static_assert can be disabled by
109
// defining APPROVALS_CATCH_DISABLE_FILE_MACRO_CHECK.
@@ -28,6 +27,5 @@ __FILE__
2827
// clang-format on
2928
);
3029
#endif // APPROVALS_CATCH_DISABLE_FILE_MACRO_CHECK
31-
// </SingleHpp>
3230

3331
#endif //APPROVALTESTS_CPP_CHECKFILEMACROISABSOLUTE_H

ApprovalTests/integrations/catch/Catch2Approvals.h

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "ApprovalTests/namers/ApprovalTestNamer.h"
66
#include "ApprovalTests/integrations/CheckFileMacroIsAbsolute.h"
77

8-
// <SingleHpp unalterable>
98
#if defined(APPROVALS_CATCH_EXISTING_MAIN)
109
#define APPROVALS_CATCH
1110
#define CATCH_CONFIG_RUNNER
@@ -79,5 +78,4 @@ struct Catch2TestCommitRevert : Catch::TestEventListenerBase
7978
//}
8079
CATCH_REGISTER_LISTENER(Catch2TestCommitRevert)
8180
#endif
82-
// </SingleHpp>
8381
#endif //APPROVALTESTS_CPP_CATCH2APPROVALS_H

ApprovalTests/integrations/doctest/DocTestApprovals.h

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "ApprovalTests/namers/ApprovalTestNamer.h"
55
#include "ApprovalTests/integrations/CheckFileMacroIsAbsolute.h"
66

7-
// <SingleHpp unalterable>
87
#if defined(APPROVALS_DOCTEST_EXISTING_MAIN)
98
#define APPROVALS_DOCTEST
109
#define DOCTEST_CONFIG_IMPLEMENT
@@ -136,5 +135,4 @@ namespace ApprovalTests
136135
REGISTER_LISTENER("approvals", 0, ApprovalTests::DocTestApprovalListener);
137136

138137
#endif // APPROVALS_DOCTEST
139-
// </SingleHpp>
140138
#endif //APPROVALTESTS_CPP_DOCTESTAPPROVALS_H

ApprovalTests/integrations/google/GoogleTestApprovals.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212

1313
#ifdef APPROVALS_GOOGLETEST
1414

15-
// <SingleHpp unalterable>
16-
#include "gtest/gtest.h"
15+
#include <gtest/gtest.h>
1716

1817
namespace ApprovalTests
1918
{
@@ -67,6 +66,5 @@ int main(int argc, char** argv)
6766
}
6867
#endif //APPROVALS_GOOGLETEST_EXISTING_MAIN
6968

70-
// </SingleHpp>
7169
#endif
7270
#endif //APPROVALTESTS_CPP_GOOGLTESTAPPPROVALS_H

ApprovalTests/integrations/ut/UTApprovals.h

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "ApprovalTests/namers/ApprovalTestNamer.h"
55

6-
// <SingleHpp unalterable>
76
#ifdef APPROVALS_UT
87

98
#if !(__GNUC__ >= 9 or __clang_major__ >= 9)
@@ -95,5 +94,4 @@ auto boost::ut::cfg<boost::ut::override> =
9594
boost::ut::runner<ApprovalTests::cfg::reporter>{};
9695

9796
#endif // APPROVALS_UT
98-
// </SingleHpp>
9997
#endif //APPROVALTESTS_CPP_UTAPPROVALS_H

ApprovalTests/launchers/CommandLauncher.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ namespace ApprovalTests
1616
};
1717
}
1818

19-
#endif
19+
#endif // APPROVALTESTS_CPP_COMMANDLAUNCHER_H

ApprovalTests/namers/ApprovalTestNamer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,4 @@ namespace ApprovalTests
192192
};
193193
}
194194

195-
#endif
195+
#endif // APPROVALTESTS_CPP_APPROVALTESTNAMER_H

ApprovalTests/namers/HelpMessages.h

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <string>
55
#include "ApprovalTests/utilities/StringUtils.h"
66

7-
// <SingleHpp unalterable>
87
namespace ApprovalTests
98
{
109
class HelpMessages
@@ -69,6 +68,5 @@ namespace ApprovalTests
6968
}
7069
};
7170
}
72-
// </SingleHpp>
7371

7472
#endif //APPROVALTESTS_CPP_HELPMESSAGES_H

ApprovalTests/reporters/AutoApproveReporter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ namespace ApprovalTests
2121
};
2222
}
2323

24-
#endif
24+
#endif // APPROVALTESTS_CPP_AUTOAPPROVEREPORTER_H

ApprovalTests/reporters/CIBuildOnlyReporterUtils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include "ApprovalTests/reporters/QuietReporter.h"
55
#include "ApprovalTests/reporters/FrontLoadedReporterDisposer.h"
6-
#include <ApprovalTests/Approvals.h>
6+
#include "ApprovalTests/Approvals.h"
77

88
namespace ApprovalTests
99
{

ApprovalTests/utilities/CartesianProduct.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ namespace ApprovalTests
205205
} // namespace CartesianProduct
206206
} // namespace ApprovalTests
207207

208-
#endif
208+
#endif // APPROVALTESTS_CPP_CARTESIANPRODUCT_H

ApprovalTests/utilities/FileUtils.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
//
2-
// Created by LLEWELLYN FALCO on 12/2/17.
3-
//
4-
51
#ifndef APPROVALTESTS_CPP_FILEUTILS_H
62
#define APPROVALTESTS_CPP_FILEUTILS_H
73

ApprovalTests/utilities/FileUtilsSystemSpecific.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ namespace ApprovalTests
3131
}
3232
};
3333
}
34-
#endif
34+
#endif // APPROVALTESTS_CPP_FILEUTILSSYSTEMSPECIFIC_H

ApprovalTests/utilities/SystemUtils.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define APPROVALTESTS_CPP_SYSTEMUTILS_H
33

44
#include "ApprovalTests/utilities/WinMinGWUtils.h"
5-
// <SingleHpp unalterable>
65
#ifdef _WIN32
76
// ReSharper disable once CppUnusedIncludeDirective
87
#include <io.h>
@@ -11,7 +10,6 @@
1110
// ReSharper disable once CppUnusedIncludeDirective
1211
#include <unistd.h>
1312
#endif
14-
// </SingleHpp>
1513

1614
#include "ApprovalTests/utilities/FileUtils.h"
1715
#include "ApprovalTests/utilities/StringUtils.h"
@@ -193,4 +191,4 @@ namespace ApprovalTests
193191
}
194192
};
195193
}
196-
#endif
194+
#endif // APPROVALTESTS_CPP_SYSTEMUTILS_H

ApprovalTests/utilities/WinMinGWUtils.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef APPROVALTESTS_CPP_WINMINGWUTILS_H
22
#define APPROVALTESTS_CPP_WINMINGWUTILS_H
33

4-
// <SingleHpp unalterable>
5-
64
#if (defined(__MINGW32__) || defined(__MINGW64__))
75
#define APPROVAL_TESTS_MINGW
86
#endif
@@ -26,6 +24,4 @@ extern "C"
2624

2725
#endif // APPROVAL_TESTS_MINGW
2826

29-
// </SingleHpp>
30-
3127
#endif //APPROVALTESTS_CPP_WINMINGWUTILS_H

ApprovalTests/writers/ExistingFile.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ namespace ApprovalTests
3131
};
3232
}
3333

34-
#endif
34+
#endif // APPROVALTESTS_CPP_EXISTINGFILE_H

ApprovalTests/writers/StringWriter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ namespace ApprovalTests
4949
}
5050
};
5151
}
52-
#endif
52+
#endif // APPROVALTESTS_CPP_STRINGWRITER_H

build/SingleHpp.v.0.0.2.jar

-773 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#! /usr/bin/env python3
2+
import os
3+
4+
from scripts.single_header_file import SingleHeaderFile
5+
6+
if __name__ == '__main__':
7+
os.chdir("../ApprovalTests")
8+
SingleHeaderFile.create('.')

build/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pyperclip
22
GitPython
3+
approvaltests

build/scripts/__init__.py

Whitespace-only changes.

build/scripts/conan_release.py

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def sync_conan_repo(new_version):
4242
repo.remote('upstream').pull('master')
4343
repo.remote('origin').push('master')
4444

45+
# TODO If we had previously created the branch for this release version, and then
46+
# changes were pushed to conan master, we will get an error about the
47+
# branch already existing, but pointing to a different change
4548
new_branch = f'approvaltests.cpp.{version.get_version_without_v(new_version)}'
4649
current = repo.create_head(new_branch)
4750
current.checkout()

0 commit comments

Comments
 (0)