mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
updating from test loop from int to size_t
This commit is contained in:
parent
8579165d0a
commit
c31593dd0d
@ -966,7 +966,7 @@ TEST(span_test, from_array_constructor)
|
|||||||
EXPECT_TRUE(av.subspan(5).size() == 0);
|
EXPECT_TRUE(av.subspan(5).size() == 0);
|
||||||
EXPECT_DEATH(av.subspan(6).size(), deathstring);
|
EXPECT_DEATH(av.subspan(6).size(), deathstring);
|
||||||
const auto av2 = av.subspan(1);
|
const auto av2 = av.subspan(1);
|
||||||
for (int i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2);
|
for (std::size_t i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -977,7 +977,7 @@ TEST(span_test, from_array_constructor)
|
|||||||
EXPECT_TRUE(av.subspan(5).size() == 0);
|
EXPECT_TRUE(av.subspan(5).size() == 0);
|
||||||
EXPECT_DEATH(av.subspan(6).size(), deathstring);
|
EXPECT_DEATH(av.subspan(6).size(), deathstring);
|
||||||
const auto av2 = av.subspan(1);
|
const auto av2 = av.subspan(1);
|
||||||
for (int i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2);
|
for (std::size_t i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user