summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-1/+1
| | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Issue: #26123
* Tests: Fix RunCMake.GenerateExportHeader use of size_tBrad King2021-04-281-1/+1
| | | | | | | Since commit ddcd1469e8 (MSYS: Add support for running under MSYS runtime environment, 2021-04-01) the test uses `std::size_t` without including `<cstddef>`. Also, the type does not exist under `std::` on VS 6. Use just `size_t` instead.
* MSYS: Add support for running under MSYS runtime environmentOrgad Shaneh2021-04-261-9/+15
| | | | Detect MSYS as CYGWIN, with the required adaptations.
* replace std::string::substr() with operations that do not allocate memoryRolf Eike Beer2020-03-231-3/+3
| | | | | Modify the original string instead of creating a new copy with substr() when it is not used for anything else afterwards.
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-5/+5
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* Tests: Refactor GenerateExportHeader test codeMatthew Woehlke2016-09-121-59/+74
| | | | | | | | | | | | | | Refactor the library code used in the GenerateExportHeader test to use an improved naming convention that more directly identifies what it being tested, making use of namespaces to avoid possible symbol collisions. This also eliminates duplicate cases such as `libshared()` and `libshared_not_exported()` which had the same decoration, and adds consistent pairings of <name>_EXPORT and <name>_DEPRECATED_EXPORT which were missing previously. The data tests from the previous commit are also added to `libstatic` and `libshared_and_static` for consistency. Note that there are no exported members of exported classes, as these are not allowed on Windows.
* Tests: Add data symbols to GenerateExportHeader testMatthew Woehlke2016-09-121-0/+20
| | | | | | Add static data members and global variables to the GenerateExportHeader shared library, testing that export decoration for these works in addition to decoration of classes and free functions.
* Tests: Add failure test for GenerateExportHeaderMatthew Woehlke2016-09-121-18/+15
| | | | | | | | | | | | | | | | | | | | | | Modify notation of statements in the GenerateExportHeader test expected to result in link errors. Modify script used to build the test to also generate a suite of modified sources, each having exactly one of the failing lines enabled, and to generate EXCLUDE_FROM_ALL executables for the same. Modify RunCMake script used to drive the test to read the list of such executables and try to build each of them, verifying that they do in fact fail to build. This will verify that the _NO_EXPORT macros are working as expected, and will also catch errors like the one that commit 0cbaaf2d (GenerateExportHeader: Fix add_compiler_export_flags regression, 2016-09-01) fixed. When setting up the failure tests for GenerateExportHeader, check if the compiler actually hides non-exported stuff. If not, the failure tests won't fail, and will cause the overall test to fail. Since this typically is only the case for very old compilers, simply skipping them as opposed to trying to do something more fine grained seems reasonably safe.
* Tests: Port GenerateExportHeader test to RunCMake infrastructureBrad King2016-09-051-0/+137
This will allow build failure cases to be added later.