diff options
author | kcgen <kcgen@users.noreply.github.com> | 2022-10-06 22:57:33 +0300 |
---|---|---|
committer | kcgen <1557255+kcgen@users.noreply.github.com> | 2022-10-07 00:43:25 +0300 |
commit | 0aaf2461e70638aa379951ff832671145dbe61e4 (patch) | |
tree | 2ffd1530b694b0ec46fc02ba4171386ac3cc51d6 /tests | |
parent | 4583e0aab882b4d2d3d80d41702bc90fc249700f (diff) |
Move the stubbed MSG_ functions into a dedicated libmisc dep
This new "libmisc_stubs_dep" provides a stand-alone libmisc
with all (other misc) functions supported, however without
requiring even more DOSBox libs to satisfy all the symbols.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/meson.build | 18 | ||||
-rw-r--r-- | tests/stubs.cpp | 11 | ||||
-rw-r--r-- | tests/vs/tests.vcxproj | 1 |
3 files changed, 11 insertions, 19 deletions
diff --git a/tests/meson.build b/tests/meson.build index 345f7e7a1..46e2c70b2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -43,7 +43,7 @@ endforeach example = executable( 'example', ['example_tests.cpp', 'stubs.cpp'], - dependencies: [gmock_dep, libmisc_dep, ghc_dep, libloguru_dep], + dependencies: [gmock_dep, libmisc_stubs_dep, ghc_dep, libloguru_dep], include_directories: incdir, cpp_args: cpp_args, ) @@ -52,7 +52,7 @@ test('gtest example', example, should_fail: true) fs_utils = executable( 'fs_utils', ['fs_utils_tests.cpp', 'stubs.cpp'], - dependencies: [gmock_dep, libmisc_dep, ghc_dep, libloguru_dep], + dependencies: [gmock_dep, libmisc_stubs_dep, ghc_dep, libloguru_dep], include_directories: incdir, cpp_args: cpp_args, ) @@ -66,20 +66,20 @@ test( # other unit tests unit_tests = [ - {'name': 'ansi_code_markup', 'deps': [libmisc_dep]}, + {'name': 'ansi_code_markup', 'deps': [libmisc_stubs_dep]}, {'name': 'bit_view', 'deps': []}, {'name': 'bitops', 'deps': []}, {'name': 'dos_files', 'deps': [dosbox_dep], 'extra_cpp': []}, {'name': 'drives', 'deps': [dosbox_dep], 'extra_cpp': []}, {'name': 'int10_modes', 'deps': [dosbox_dep], 'extra_cpp': []}, - {'name': 'iohandler_containers', 'deps': [libmisc_dep]}, - {'name': 'math_utils', 'deps': [libmisc_dep]}, - {'name': 'rwqueue', 'deps': [libmisc_dep]}, - {'name': 'setup', 'deps': [libmisc_dep]}, + {'name': 'iohandler_containers', 'deps': [libmisc_stubs_dep]}, + {'name': 'math_utils', 'deps': [libmisc_stubs_dep]}, + {'name': 'rwqueue', 'deps': [libmisc_stubs_dep]}, + {'name': 'setup', 'deps': [libmisc_stubs_dep]}, {'name': 'shell_cmds', 'deps': [dosbox_dep], 'extra_cpp': []}, {'name': 'shell_redirection', 'deps': [dosbox_dep], 'extra_cpp': []}, - {'name': 'string_utils', 'deps': [libmisc_dep]}, - {'name': 'support', 'deps': [libmisc_dep]}, + {'name': 'string_utils', 'deps': [libmisc_stubs_dep]}, + {'name': 'support', 'deps': [libmisc_stubs_dep]}, ] extra_link_flags = [] diff --git a/tests/stubs.cpp b/tests/stubs.cpp index b23c7c6ec..46cf8c98d 100644 --- a/tests/stubs.cpp +++ b/tests/stubs.cpp @@ -28,16 +28,7 @@ void GFX_ShowMsg(const char *, ...) {} void DEBUG_ShowMsg(const char *, ...) {} -void DEBUG_HeavyWriteLogInstruction(){} -void MSG_Add(const char *, const char *){} -const char *MSG_Get(char const *) -{ - return nullptr; -} -const char *MSG_GetRaw(char const *) -{ - return nullptr; -} +void DEBUG_HeavyWriteLogInstruction() {} #if C_DEBUG void LOG::operator()([[maybe_unused]] char const *buf, ...) diff --git a/tests/vs/tests.vcxproj b/tests/vs/tests.vcxproj index 30a1e85ee..4215d6791 100644 --- a/tests/vs/tests.vcxproj +++ b/tests/vs/tests.vcxproj @@ -340,6 +340,7 @@ $(TargetPath)</Command> <ClCompile Include="..\..\src\misc\cross.cpp" /> <ClCompile Include="..\..\src\misc\fs_utils.cpp" /> <ClCompile Include="..\..\src\misc\fs_utils_win32.cpp" /> + <ClCompile Include="..\..\src\misc\messages_stubs.cpp" /> <ClCompile Include="..\..\src\misc\rwqueue.cpp" /> <ClCompile Include="..\..\src\misc\setup.cpp" /> <ClCompile Include="..\..\src\misc\string_utils.cpp" /> |