mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
added test for gsl::at use with gsl::span argument
This commit is contained in:
parent
7c012dfe31
commit
6189b15ac4
@ -1354,6 +1354,13 @@ SUITE(span_tests)
|
|||||||
CHECK(match[0].first == f_it);
|
CHECK(match[0].first == f_it);
|
||||||
CHECK(match[0].second == (f_it + 1));
|
CHECK(match[0].second == (f_it + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(interop_with_gsl_at)
|
||||||
|
{
|
||||||
|
int arr[5] = {1, 2, 3, 4, 5};
|
||||||
|
span<int> s{arr};
|
||||||
|
CHECK(at(s,0) == 1 && at(s,1) == 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int, const char* []) { return UnitTest::RunAllTests(); }
|
int main(int, const char* []) { return UnitTest::RunAllTests(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user