GSL/tests
Nicholas Guriev d9fa328f89
Improve build script for standalone tests (#963)
* Require Git for build tests only if installed GTest is not found

Cloning via Git is not the only path to obtain Google Test framework. In Linux,
using a system package manager is the preferred way, and gtest can be installed
through APK, APT, DNF, pacman, or many other. Now we make Git mandatory after
checking GTest existence.

See also: https://github.com/microsoft/GSL/pull/961#discussion_r548959056

* Support standalone tests

The patch makes possible to run auto-tests against globally installed GSL,
ignoring local headers. To do this, run CMake in the tests/ folder.

    cmake -B build -S tests -DGSL_CXX_STANDARD=14

This feature should not break existing build recipes.

Co-authored-by: Nicholas Guriev <nicholas@guriev.su>
2021-01-08 10:55:59 -08:00
..
algorithm_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
assertion_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
at_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
byte_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
CMakeLists.txt Improve build script for standalone tests (#963) 2021-01-08 10:55:59 -08:00
CMakeLists.txt.in update gtest (#965) 2021-01-04 11:31:01 -08:00
no_exception_ensure_tests.cpp
notnull_tests.cpp Adding std::hash<not_null<T>> tests to notnull_tests.cpp (#947) 2020-11-03 16:56:09 -08:00
owner_tests.cpp MSVC and CoreChecker warning suppression for tests to CMake 2020-01-16 11:49:15 +01:00
span_compatibility_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
span_ext_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
span_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
strict_notnull_tests.cpp remove move constructor for not_null. 2020-01-30 17:00:13 -08:00
string_span_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00
utils_tests.cpp renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946) 2020-10-29 17:38:48 -07:00