Skip to content

Commit 3e0613c

Browse files
committed
Add Catch2 v3 submodule
1 parent 47a9982 commit 3e0613c

File tree

8 files changed

+402
-6
lines changed

8 files changed

+402
-6
lines changed

.codacy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
exclude_paths:
33
- 'bench/**'
44
- 'build/**'
5-
- 'examples/**'
5+
- 'extern/**'
66
- 'test/**'

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "test/Catch2"]
1111
path = test/Catch2
1212
url = https://github.com/catchorg/Catch2.git
13+
[submodule "extern/catchorg/Catch2"]
14+
path = extern/catchorg/Catch2
15+
url = https://github.com/catchorg/Catch2.git

build/nix/Makefile

+8-5
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ include /usr/local/src/fly/api.mk
1111
$(eval $(call ADD_TARGET, libfly, fly, LIB))
1212

1313
# Test targets.
14+
$(eval $(call ADD_TARGET, catch2, extern/catchorg, LIB))
1415
$(eval $(call ADD_TARGET, libfly_unit_tests, test, TEST, libfly))
1516
$(eval $(call ADD_TARGET, libfly_benchmarks, bench, BIN, libfly))
1617

1718
# Paths to ignore during code coverage reporting.
1819
#
19-
# 1. Ignore benchmarking files.
20-
# 2. Ignore test files.
21-
# 3. Ignore system_impl.hpp - this file is entirely constexpr functions that do not execute at
20+
# 1. Ignore test files.
21+
# 2. Ignore benchmarking files.
22+
# 3. Ignore external third-party files.
23+
# 4. Ignore system_impl.hpp - this file is entirely constexpr functions that do not execute at
2224
# runtime, which llvm-cov doesn't seem to recognize.
23-
# 4. Ignore literal_parser.hpp - this file is entirely constexpr functions that do not execute at
25+
# 5. Ignore literal_parser.hpp - this file is entirely constexpr functions that do not execute at
2426
# runtime, which llvm-cov doesn't seem to recognize.
25-
$(eval $(call IGNORE_FOR_COVERAGE, bench/))
2627
$(eval $(call IGNORE_FOR_COVERAGE, test/))
28+
$(eval $(call IGNORE_FOR_COVERAGE, bench/))
29+
$(eval $(call IGNORE_FOR_COVERAGE, extern/))
2730
$(eval $(call IGNORE_FOR_COVERAGE, fly/system/nix/system_impl.hpp))
2831
$(eval $(call IGNORE_FOR_COVERAGE, fly/types/numeric/detail/literal_parser.hpp))
2932

build/win/catch2/catch2.vcxproj

+233
Large diffs are not rendered by default.
+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_approx.cpp" />
5+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_assertion_result.cpp" />
6+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_config.cpp" />
7+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_message.cpp" />
8+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_registry_hub.cpp" />
9+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_session.cpp" />
10+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_test_case_info.cpp" />
11+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_test_spec.cpp" />
12+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_timer.cpp" />
13+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_tostring.cpp" />
14+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_totals.cpp" />
15+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\catch_version.cpp" />
16+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\generators\internal\catch_generators_combined_tu.cpp" />
17+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\interfaces\catch_interfaces_combined_tu.cpp" />
18+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\interfaces\catch_interfaces_reporter.cpp" />
19+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_assertion_handler.cpp" />
20+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_clara.cpp" />
21+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_combined_tu.cpp" />
22+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_commandline.cpp" />
23+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_common.cpp" />
24+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_console_colour.cpp" />
25+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_context.cpp" />
26+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_debug_console.cpp" />
27+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_debugger.cpp" />
28+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_enforce.cpp" />
29+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_enum_values_registry.cpp" />
30+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_exception_translator_registry.cpp" />
31+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_fatal_condition_handler.cpp" />
32+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_list.cpp" />
33+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_output_redirect.cpp" />
34+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_random_number_generator.cpp" />
35+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_reporter_registry.cpp" />
36+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_result_type.cpp" />
37+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_run_context.cpp" />
38+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_section.cpp" />
39+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_singletons.cpp" />
40+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_stream.cpp" />
41+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_string_manip.cpp" />
42+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_stringref.cpp" />
43+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_tag_alias_registry.cpp" />
44+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_test_case_registry_impl.cpp" />
45+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_test_case_tracker.cpp" />
46+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_test_registry.cpp" />
47+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_test_spec_parser.cpp" />
48+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_textflow.cpp" />
49+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_wildcard_pattern.cpp" />
50+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\internal\catch_xmlwriter.cpp" />
51+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\matchers\catch_matchers_floating.cpp" />
52+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\matchers\catch_matchers_string.cpp" />
53+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\matchers\catch_matchers_templated.cpp" />
54+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\matchers\internal\catch_matchers_combined_tu.cpp" />
55+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_automake.cpp" />
56+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_combined_tu.cpp" />
57+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_compact.cpp" />
58+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_console.cpp" />
59+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_cumulative_base.cpp" />
60+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_junit.cpp" />
61+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_listening.cpp" />
62+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_sonarqube.cpp" />
63+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_streaming_base.cpp" />
64+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_tap.cpp" />
65+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_teamcity.cpp" />
66+
<ClCompile Include="..\..\..\extern\catchorg\Catch2\src\catch2\reporters\catch_reporter_xml.cpp" />
67+
</ItemGroup>
68+
</Project>

build/win/libfly.sln

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfly_benchmarks", "libfly
1414
EndProject
1515
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfly_util", "libfly_util\libfly_util.vcxproj", "{E18789F2-FEF0-48BC-8F8D-AA9A7B6E6885}"
1616
EndProject
17+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "catch2", "catch2\catch2.vcxproj", "{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}"
18+
EndProject
1719
Global
1820
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1921
Debug|x64 = Debug|x64
@@ -54,6 +56,14 @@ Global
5456
{E18789F2-FEF0-48BC-8F8D-AA9A7B6E6885}.Release|x64.Build.0 = Release|x64
5557
{E18789F2-FEF0-48BC-8F8D-AA9A7B6E6885}.Release|x86.ActiveCfg = Release|Win32
5658
{E18789F2-FEF0-48BC-8F8D-AA9A7B6E6885}.Release|x86.Build.0 = Release|Win32
59+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Debug|x64.ActiveCfg = Debug|x64
60+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Debug|x64.Build.0 = Debug|x64
61+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Debug|x86.ActiveCfg = Debug|Win32
62+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Debug|x86.Build.0 = Debug|Win32
63+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Release|x64.ActiveCfg = Release|x64
64+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Release|x64.Build.0 = Release|x64
65+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Release|x86.ActiveCfg = Release|Win32
66+
{FDB4C725-54DE-4EB8-AD9D-1A4A332BABFD}.Release|x86.Build.0 = Release|Win32
5767
EndGlobalSection
5868
GlobalSection(SolutionProperties) = preSolution
5969
HideSolutionNode = FALSE

extern/catchorg/Catch2

Submodule Catch2 added at b9853b4

extern/catchorg/files.mk

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
SRC_$(d) := \
2+
$(d)/Catch2/src/catch2/catch_approx.cpp \
3+
$(d)/Catch2/src/catch2/catch_assertion_result.cpp \
4+
$(d)/Catch2/src/catch2/catch_config.cpp \
5+
$(d)/Catch2/src/catch2/catch_message.cpp \
6+
$(d)/Catch2/src/catch2/catch_registry_hub.cpp \
7+
$(d)/Catch2/src/catch2/catch_session.cpp \
8+
$(d)/Catch2/src/catch2/catch_test_case_info.cpp \
9+
$(d)/Catch2/src/catch2/catch_test_spec.cpp \
10+
$(d)/Catch2/src/catch2/catch_timer.cpp \
11+
$(d)/Catch2/src/catch2/catch_tostring.cpp \
12+
$(d)/Catch2/src/catch2/catch_totals.cpp \
13+
$(d)/Catch2/src/catch2/catch_version.cpp \
14+
$(d)/Catch2/src/catch2/generators/internal/catch_generators_combined_tu.cpp \
15+
$(d)/Catch2/src/catch2/interfaces/catch_interfaces_combined_tu.cpp \
16+
$(d)/Catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp \
17+
$(d)/Catch2/src/catch2/internal/catch_assertion_handler.cpp \
18+
$(d)/Catch2/src/catch2/internal/catch_clara.cpp \
19+
$(d)/Catch2/src/catch2/internal/catch_combined_tu.cpp \
20+
$(d)/Catch2/src/catch2/internal/catch_commandline.cpp \
21+
$(d)/Catch2/src/catch2/internal/catch_common.cpp \
22+
$(d)/Catch2/src/catch2/internal/catch_console_colour.cpp \
23+
$(d)/Catch2/src/catch2/internal/catch_context.cpp \
24+
$(d)/Catch2/src/catch2/internal/catch_debug_console.cpp \
25+
$(d)/Catch2/src/catch2/internal/catch_debugger.cpp \
26+
$(d)/Catch2/src/catch2/internal/catch_enforce.cpp \
27+
$(d)/Catch2/src/catch2/internal/catch_enum_values_registry.cpp \
28+
$(d)/Catch2/src/catch2/internal/catch_exception_translator_registry.cpp \
29+
$(d)/Catch2/src/catch2/internal/catch_fatal_condition_handler.cpp \
30+
$(d)/Catch2/src/catch2/internal/catch_list.cpp \
31+
$(d)/Catch2/src/catch2/internal/catch_output_redirect.cpp \
32+
$(d)/Catch2/src/catch2/internal/catch_random_number_generator.cpp \
33+
$(d)/Catch2/src/catch2/internal/catch_reporter_registry.cpp \
34+
$(d)/Catch2/src/catch2/internal/catch_result_type.cpp \
35+
$(d)/Catch2/src/catch2/internal/catch_run_context.cpp \
36+
$(d)/Catch2/src/catch2/internal/catch_section.cpp \
37+
$(d)/Catch2/src/catch2/internal/catch_singletons.cpp \
38+
$(d)/Catch2/src/catch2/internal/catch_stream.cpp \
39+
$(d)/Catch2/src/catch2/internal/catch_string_manip.cpp \
40+
$(d)/Catch2/src/catch2/internal/catch_stringref.cpp \
41+
$(d)/Catch2/src/catch2/internal/catch_tag_alias_registry.cpp \
42+
$(d)/Catch2/src/catch2/internal/catch_test_case_registry_impl.cpp \
43+
$(d)/Catch2/src/catch2/internal/catch_test_case_tracker.cpp \
44+
$(d)/Catch2/src/catch2/internal/catch_test_registry.cpp \
45+
$(d)/Catch2/src/catch2/internal/catch_test_spec_parser.cpp \
46+
$(d)/Catch2/src/catch2/internal/catch_textflow.cpp \
47+
$(d)/Catch2/src/catch2/internal/catch_wildcard_pattern.cpp \
48+
$(d)/Catch2/src/catch2/internal/catch_xmlwriter.cpp \
49+
$(d)/Catch2/src/catch2/matchers/catch_matchers_floating.cpp \
50+
$(d)/Catch2/src/catch2/matchers/catch_matchers_string.cpp \
51+
$(d)/Catch2/src/catch2/matchers/catch_matchers_templated.cpp \
52+
$(d)/Catch2/src/catch2/matchers/internal/catch_matchers_combined_tu.cpp \
53+
$(d)/Catch2/src/catch2/reporters/catch_reporter_automake.cpp \
54+
$(d)/Catch2/src/catch2/reporters/catch_reporter_combined_tu.cpp \
55+
$(d)/Catch2/src/catch2/reporters/catch_reporter_compact.cpp \
56+
$(d)/Catch2/src/catch2/reporters/catch_reporter_console.cpp \
57+
$(d)/Catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp \
58+
$(d)/Catch2/src/catch2/reporters/catch_reporter_junit.cpp \
59+
$(d)/Catch2/src/catch2/reporters/catch_reporter_listening.cpp \
60+
$(d)/Catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp \
61+
$(d)/Catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp \
62+
$(d)/Catch2/src/catch2/reporters/catch_reporter_tap.cpp \
63+
$(d)/Catch2/src/catch2/reporters/catch_reporter_teamcity.cpp \
64+
$(d)/Catch2/src/catch2/reporters/catch_reporter_xml.cpp
65+
66+
CXXFLAGS_$(d) += \
67+
-I$(d)/Catch2/src \
68+
-DCATCH_CONFIG_PREFIX_ALL \
69+
-DCATCH_CONFIG_FAST_COMPILE \
70+
-DCATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER \
71+
-DCATCH_CONFIG_DEFAULT_REPORTER="\"libfly\"" \
72+
-Wno-ctor-dtor-privacy \
73+
-Wno-float-equal \
74+
-Wno-newline-eof \
75+
-Wno-non-virtual-dtor \
76+
-Wno-redundant-decls \
77+
-Wno-sign-conversion
78+

0 commit comments

Comments
 (0)