xtd 0.2.0
Loading...
Searching...
No Matches
__google_test_markers.hpp
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_TUNIT_INTERNAL__)
7#error "Do not include this file: Internal use only"
8#endif
10
12// The following variables are a hack to ensure that GoogleTestAdapter (Microsoft Visual Studio) will detect the tunit application as a google test application...
13// See https://github.com/csoltenborn/GoogleTestAdapter/blob/master/GoogleTestAdapter/Core/GoogleTestConstants.cs
14inline static const char* __test_body_signature__ = "::TestBody";
15inline static const char* __parameterized_test_marker__ = " # GetParam() = ";
16inline static const char* __typed_test_marker__ = ". # TypeParam = ";
17inline static const char* __google_test_dll_marker__ = "gtest.dll";
18inline static const char* __google_test_dll_marker_debug__ = "gtestd.dll";
19inline static const char* __google_test_main_dll_marker__ = "gtest_main.dll";
20inline static const char* __google_test_main_dll_marker_debug__ = "gtest_maind.dll";
21inline static const char* __google_test_executable_markers__[] = {
22 "This program contains tests written using Google Test. You can use the",
23 "For more information, please read the Google Test documentation at",
24 "Run only the tests whose name matches one of the positive patterns but",
25 "--gtest_list_tests"
26};
27
28inline void __unused_google_test_markers__() {
29 [[maybe_unused]] auto s1 = __test_body_signature__;
30 [[maybe_unused]] auto s2 = __parameterized_test_marker__;
31 [[maybe_unused]] auto s3 = __typed_test_marker__;
32 [[maybe_unused]] auto s4 = __google_test_dll_marker__;
33 [[maybe_unused]] auto s5 = __google_test_dll_marker_debug__;
34 [[maybe_unused]] auto s6 = __google_test_main_dll_marker__;
35 [[maybe_unused]] auto s7 = __google_test_main_dll_marker_debug__;
36 [[maybe_unused]] auto s8 = __google_test_executable_markers__;
37}