diff options
author | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2021-05-21 04:18:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 04:18:08 +0300 |
commit | b26f6d5ec7b043f9d459c1dfdd6da4d930d4e9b4 (patch) | |
tree | 5d55449173cdfb33ff1c3f51edef81910a1ad51b /tests/deathTestCommon.h | |
parent | c1cbb41b428f15e53454682a45f03ea31f1da0a7 (diff) |
gsl::at behavior change regarding gsl::span (#985)
* move span specialization of 'at' to <gsl/span> and update the parameter to be taken by reference
* undid previous changes and acted upon decisions made in maintainer sync. Fixed tests failing in /kernel mode
* ran clang-format on the include folder
* ran clang-format on the test folder
Co-authored-by: Jordan Maples <jordan.maples@microsoft.com>
Diffstat (limited to 'tests/deathTestCommon.h')
-rw-r--r-- | tests/deathTestCommon.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/deathTestCommon.h b/tests/deathTestCommon.h new file mode 100644 index 0000000..7bf2423 --- /dev/null +++ b/tests/deathTestCommon.h @@ -0,0 +1,11 @@ +#pragma once
+#include <gsl/assert>
+
+constexpr char deathstring[] = "Expected Death";
+constexpr char failed_set_terminate_deathstring[] = ".*";
+
+// This prevents a failed call to set_terminate from failing the test suite.
+constexpr const char* GetExpectedDeathString(std::terminate_handler handle)
+{
+ return handle ? deathstring : failed_set_terminate_deathstring;
+}
|