File tree Expand file tree Collapse file tree
Projects/VisualStudio/max Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Copyright 2026, The max Contributors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ #ifndef MAX_TESTING_EXPORT_HPP
6+ #define MAX_TESTING_EXPORT_HPP
7+
8+ // There are functions which are only used within a given translation unit.
9+ // They should not be exported to the linker.
10+
11+ // However, you will want to test those functions. And since the test code
12+ // likely lives in a different file, you *will* want the functions to be
13+ // exported to the linker.
14+
15+ // If a project has the definition MAX_TEST, these macros will export the
16+ // functions marked with them.
17+ // A normal project won't define MAX_TEST and so the functions remain hidden.
18+
19+ #ifdef MAX_TEST
20+ #define MAX_TESTING_EXPORT_DECLARATION ( Declaration ) Declaration
21+ #define MAX_TESTING_EXPORT_DEFINITION ( Definition ) Definition
22+ #else
23+ #define MAX_TESTING_EXPORT_DECLARATION ( Declaration )
24+ #define MAX_TESTING_EXPORT_DEFINITION ( Definition ) static Definition
25+ #endif
26+
27+ #endif // #ifndef MAX_TESTING_EXPORT_HPP
Original file line number Diff line number Diff line change 289289 <ClInclude Include =" ..\..\..\Code\max\Logging\DoNothingLogger.hpp" />
290290 <ClInclude Include =" ..\..\..\Code\max\Testing\CoutResultPolicy.hpp" />
291291 <ClInclude Include =" ..\..\..\Code\max\Testing\Test.hpp" />
292+ <ClInclude Include =" ..\..\..\Code\max\Testing\TestingExport.hpp" />
292293 <ClInclude Include =" ..\..\..\Code\max\Testing\TestSuite.hpp" />
293294 </ItemGroup >
294295 <ItemGroup >
Original file line number Diff line number Diff line change 492492 <ClInclude Include =" ..\..\..\Code\max\Algorithms\DeferTest.hpp" >
493493 <Filter >Code\max\Algorithms</Filter >
494494 </ClInclude >
495+ <ClInclude Include =" ..\..\..\Code\max\Testing\TestingExport.hpp" >
496+ <Filter >Code\max\Testing</Filter >
497+ </ClInclude >
495498 </ItemGroup >
496499 <ItemGroup >
497500 <ClCompile Include =" ..\..\..\Code\max\Algorithms\IsBetweenTest.cpp" >
You can’t perform that action at this time.
0 commit comments