projects
/
platform
/
upstream
/
libgee.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e16783
)
Skip first and last element during counting down indices in remove test
author
Maciej Piechotka
<uzytkownik2@gmail.com>
Fri, 21 Feb 2014 01:41:48 +0000
(
02:41
+0100)
committer
Maciej Piechotka
<uzytkownik2@gmail.com>
Fri, 21 Feb 2014 01:41:48 +0000
(
02:41
+0100)
tests/testlist.vala
patch
|
blob
|
history
diff --git
a/tests/testlist.vala
b/tests/testlist.vala
index
54a7503
..
1873dfc
100644
(file)
--- a/
tests/testlist.vala
+++ b/
tests/testlist.vala
@@
-349,11
+349,15
@@
public abstract class ListTests : CollectionTests {
for (uint i = 0; i < idx.length; i++) {
int to_remove = (int)idx[i] - 1;
if (idx[i] == data.length - 1 || idx[i] == 0) {
- //
Removing
last or first element, which was already removed
+ //
Skip
last or first element, which was already removed
continue;
}
for (uint j = 0; j < i; j++) {
if (idx[j] < idx[i]) {
+ if (idx[j] == data.length - 1 || idx[j] == 0) {
+ // Last and first element were not removed
+ continue;
+ }
to_remove--;
}
}