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
path: root/tests
diff options
context:
space:
mode:
authorJordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com>2020-02-12 03:36:07 +0300
committerJordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com>2020-02-12 03:36:07 +0300
commit926aaeca5618931097a7626ffe4a0f87623e1cd8 (patch)
treeca07e5f3d02ea430e011bd8c5eaf734aab63cea0 /tests
parentcce6ee563eb2047238f57c62afe4e44a5ee8ce8a (diff)
reviewed the pr in its entirety and made some slight modifications. Removed all members and fields marked as deprecated.
Diffstat (limited to 'tests')
-rw-r--r--tests/span_tests.cpp8
-rw-r--r--tests/string_span_tests.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp
index 1f5020b..ab437a5 100644
--- a/tests/span_tests.cpp
+++ b/tests/span_tests.cpp
@@ -1485,7 +1485,7 @@ TEST(span_test, from_array_constructor)
}
}
- TEST(span_test, as_writeable_bytes)
+ TEST(span_test, as_writable_bytes)
{
int a[] = {1, 2, 3, 4};
@@ -1494,7 +1494,7 @@ TEST(span_test, from_array_constructor)
// you should not be able to get writeable bytes for const objects
span<const int> s = a;
EXPECT_TRUE(s.size() == 4);
- span<const byte> bs = as_writeable_bytes(s);
+ span<const byte> bs = as_writable_bytes(s);
EXPECT_TRUE(static_cast<void*>(bs.data()) == static_cast<void*>(s.data()));
EXPECT_TRUE(bs.size() == s.size_bytes());
#endif
@@ -1502,7 +1502,7 @@ TEST(span_test, from_array_constructor)
{
span<int> s;
- const auto bs = as_writeable_bytes(s);
+ const auto bs = as_writable_bytes(s);
EXPECT_TRUE(bs.size() == s.size());
EXPECT_TRUE(bs.size() == 0);
EXPECT_TRUE(bs.size_bytes() == 0);
@@ -1512,7 +1512,7 @@ TEST(span_test, from_array_constructor)
{
span<int> s = a;
- const auto bs = as_writeable_bytes(s);
+ const auto bs = as_writable_bytes(s);
EXPECT_TRUE(static_cast<void*>(bs.data()) == static_cast<void*>(s.data()));
EXPECT_TRUE(bs.size() == s.size_bytes());
}
diff --git a/tests/string_span_tests.cpp b/tests/string_span_tests.cpp
index c1f8cf4..7a9f7fb 100644
--- a/tests/string_span_tests.cpp
+++ b/tests/string_span_tests.cpp
@@ -1206,12 +1206,12 @@ TEST(string_span_tests, as_bytes)
EXPECT_TRUE(bs.size() == s.size_bytes());
}
-TEST(string_span_tests, as_writeable_bytes)
+TEST(string_span_tests, as_writable_bytes)
{
wchar_t buf[]{L"qwerty"};
wzstring_span<> v(buf);
const auto s = v.as_string_span();
- const auto bs = as_writeable_bytes(s);
+ const auto bs = as_writable_bytes(s);
EXPECT_TRUE(static_cast<const void*>(bs.data()) == static_cast<const void*>(s.data()));
EXPECT_TRUE(bs.size() == s.size_bytes());
}