test: make all compilers happy again
This commit is contained in:
@@ -12,7 +12,7 @@ TEST(Algorithm, StdSort) {
|
||||
|
||||
sort(arr.begin(), arr.end());
|
||||
|
||||
for(auto it = arr.begin(), last = --arr.end(); it != last; ++it) {
|
||||
for(auto it = arr.begin(), last = (arr.end() - 1u); it != last; ++it) {
|
||||
ASSERT_LT(*it, *(it + 1u));
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ TEST(Algorithm, StdSortBoxedInt) {
|
||||
return lhs.value > rhs.value;
|
||||
});
|
||||
|
||||
for(auto it = arr.begin(), last = --arr.end(); it != last; ++it) {
|
||||
for(auto it = arr.begin(), last = (arr.end() - 1u); it != last; ++it) {
|
||||
ASSERT_GT(it->value, (it + 1u)->value);
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ TEST(Algorithm, InsertionSort) {
|
||||
|
||||
sort(arr.begin(), arr.end());
|
||||
|
||||
for(auto it = arr.begin(), last = --arr.end(); it != last; ++it) {
|
||||
for(auto it = arr.begin(), last = (arr.end() - 1u); it != last; ++it) {
|
||||
ASSERT_LT(*it, *(it + 1u));
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ TEST(Algorithm, InsertionSortBoxedInt) {
|
||||
return lhs.value > rhs.value;
|
||||
});
|
||||
|
||||
for(auto it = arr.begin(), last = --arr.end(); it != last; ++it) {
|
||||
for(auto it = arr.begin(), last = (arr.end() - 1u); it != last; ++it) {
|
||||
ASSERT_GT(it->value, (it + 1u)->value);
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ TEST(Algorithm, RadixSort) {
|
||||
return value;
|
||||
});
|
||||
|
||||
for(auto it = arr.begin(), last = --arr.end(); it != last; ++it) {
|
||||
for(auto it = arr.begin(), last = (arr.end() - 1u); it != last; ++it) {
|
||||
ASSERT_LT(*it, *(it + 1u));
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ TEST(Algorithm, RadixSortBoxedInt) {
|
||||
return instance.value;
|
||||
});
|
||||
|
||||
for(auto it = arr.begin(), last = --arr.end(); it != last; ++it) {
|
||||
for(auto it = arr.begin(), last = (arr.end() - 1u); it != last; ++it) {
|
||||
ASSERT_GT(it->value, (it + 1u)->value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user