Test rust::Slice indexing

This commit is contained in:
David Tolnay 2020-12-26 23:52:41 -08:00
parent 78dd535756
commit b4512a4465
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -274,7 +274,8 @@ void c_take_slice_char(rust::Slice<const char> s) {
}
void c_take_slice_shared(rust::Slice<const Shared> s) {
if (s.size() == 2 && s.data()->z == 2020 && (s.data() + 1)->z == 2021) {
if (s.size() == 2 && s.data()->z == 2020 && s[1].z == 2021 &&
s.at(1).z == 2021 && s.front().z == 2020 && s.back().z == 2021) {
cxx_test_suite_set_correct();
}
}