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/assertion_tests.cpp
parent4f6f05d463780b94811d974426c1aef95b3db39b (diff)
removed string_view for string in tests
Diffstat (limited to 'tests/assertion_tests.cpp')
-rw-r--r--tests/assertion_tests.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/assertion_tests.cpp b/tests/assertion_tests.cpp
index e873f75..7009f86 100644
--- a/tests/assertion_tests.cpp
+++ b/tests/assertion_tests.cpp
@@ -34,7 +34,6 @@
#include <gtest/gtest.h>
#include <gsl/gsl_assert> // for fail_fast (ptr only), Ensures, Expects
-#include <string_view>
using namespace gsl;
namespace
@@ -52,7 +51,7 @@ int g(int i)
return i;
}
-constexpr std::string_view deathstring("Expected Death");
+static const std::string deathstring("Expected Death");
} // namespace
TEST(assertion_tests, expects)
@@ -61,9 +60,9 @@ TEST(assertion_tests, expects)
std::cerr << "Expected Death. expects";
std::abort();
});
-
+
EXPECT_TRUE(f(2) == 2);
- EXPECT_DEATH(f(10), deathstring.data());
+ EXPECT_DEATH(f(10), deathstring);
}
@@ -75,7 +74,7 @@ TEST(assertion_tests, ensures)
});
EXPECT_TRUE(g(2) == 3);
- EXPECT_DEATH(g(9), deathstring.data());
+ EXPECT_DEATH(g(9), deathstring);
}
#if __clang__ || __GNUC__