diff options
author | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2020-02-05 02:31:33 +0300 |
---|---|---|
committer | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2020-02-05 02:31:33 +0300 |
commit | 5a1e4f39537330c579662a76a9a9b5c8580ad708 (patch) | |
tree | dcdfff823cab98297b75da5d04ea4c091e8f2c3c /tests/span_tests.cpp | |
parent | 61c6ef8d426dd4869789be9b8432c6cb4454a8bb (diff) |
update index_type to size_type, fix a couple Expects
Diffstat (limited to 'tests/span_tests.cpp')
-rw-r--r-- | tests/span_tests.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index 8d9fadd..99ee0d8 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -105,17 +105,17 @@ TEST(span_test, from_nullptr_size_constructor) std::abort(); }); { - span<int> s{nullptr, narrow_cast<span<int>::index_type>(0)}; + span<int> s{nullptr, narrow_cast<span<int>::size_type>(0)}; EXPECT_TRUE(s.size() == 0); EXPECT_TRUE(s.data() == nullptr); - span<int> cs{nullptr, narrow_cast<span<int>::index_type>(0)}; + span<int> cs{nullptr, narrow_cast<span<int>::size_type>(0)}; EXPECT_TRUE(cs.size() == 0); EXPECT_TRUE(cs.data() == nullptr); } { auto workaround_macro = []() { - const span<int, 1> s{nullptr, narrow_cast<span<int>::index_type>(0)}; + const span<int, 1> s{nullptr, narrow_cast<span<int>::size_type>(0)}; }; EXPECT_DEATH(workaround_macro(), deathstring); } @@ -134,11 +134,11 @@ TEST(span_test, from_nullptr_size_constructor) EXPECT_DEATH(const_workaround_macro(), deathstring); } { - span<int*> s{nullptr, narrow_cast<span<int>::index_type>(0)}; + span<int*> s{nullptr, narrow_cast<span<int>::size_type>(0)}; EXPECT_TRUE(s.size() == 0); EXPECT_TRUE(s.data() == nullptr); - span<const int*> cs{nullptr, narrow_cast<span<int>::index_type>(0)}; + span<const int*> cs{nullptr, narrow_cast<span<int>::size_type>(0)}; EXPECT_TRUE(cs.size() == 0); EXPECT_TRUE(cs.data() == nullptr); } @@ -193,7 +193,7 @@ TEST(span_test, from_pointer_length_constructor) { int* p = nullptr; - span<int> s{p, narrow_cast<span<int>::index_type>(0)}; + span<int> s{p, narrow_cast<span<int>::size_type>(0)}; EXPECT_TRUE(s.size() == 0); EXPECT_TRUE(s.data() == nullptr); } @@ -214,7 +214,7 @@ TEST(span_test, from_pointer_length_constructor) { int* p = nullptr; - auto s = make_span(p, narrow_cast<span<int>::index_type>(0)); + auto s = make_span(p, narrow_cast<span<int>::size_type>(0)); EXPECT_TRUE(s.size() == 0); EXPECT_TRUE(s.data() == nullptr); } |