Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com>2019-12-12 22:15:41 +0300
committerJordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com>2019-12-12 22:15:41 +0300
commit5099e8fa3ea6d43fb0a20a47644437c6838af1aa (patch)
treee7a73a1aef6963b66f704f49b84c1830fd128653 /tests/algorithm_tests.cpp
parent4f6f05d463780b94811d974426c1aef95b3db39b (diff)
removed string_view for string in tests
Diffstat (limited to 'tests/algorithm_tests.cpp')
-rw-r--r--tests/algorithm_tests.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/algorithm_tests.cpp b/tests/algorithm_tests.cpp
index 299bb96..0866654 100644
--- a/tests/algorithm_tests.cpp
+++ b/tests/algorithm_tests.cpp
@@ -35,11 +35,10 @@
#include <gsl/gsl_algorithm> // for copy
#include <gsl/span> // for span
#include <array> // for array
-#include <string_view>
#include <cstddef> // for size_t
namespace{
-constexpr std::string_view deathstring("Expected Death");
+static const std::string deathstring("Expected Death");
}
namespace gsl
@@ -234,9 +233,9 @@ TEST(algorithm_tests, small_destination_span)
const span<int> dst_span_dyn(dst);
const span<int, 4> dst_span_static(dst);
- EXPECT_DEATH(copy(src_span_dyn, dst_span_dyn), deathstring.data());
- EXPECT_DEATH(copy(src_span_dyn, dst_span_static), deathstring.data());
- EXPECT_DEATH(copy(src_span_static, dst_span_dyn), deathstring.data());
+ EXPECT_DEATH(copy(src_span_dyn, dst_span_dyn), deathstring);
+ EXPECT_DEATH(copy(src_span_dyn, dst_span_static), deathstring);
+ EXPECT_DEATH(copy(src_span_static, dst_span_dyn), deathstring);
#ifdef CONFIRM_COMPILATION_ERRORS
copy(src_span_static, dst_span_static);