Skip to content
Permalink
Browse files

[JENKINS-26690] Noting merge of #1586.

  • Loading branch information
jglick committed Feb 27, 2015
2 parents a452023 + db1f805 commit dac7dfe94e6c21eee92704acace2079668a023b1
@@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Errors in Dashboard View plugin since 1.597.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-26690">issue 26690</a>)
<li class="rfe">
Map Queue.Item.id onto Run
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-27096">issue 27096</a>)
@@ -550,7 +550,7 @@ public boolean equals(Object o) {

private static final Comparator<Integer> COMPARATOR = new Comparator<Integer>() {
@Override public int compare(Integer o1, Integer o2) {
return o2 - o1;
return -o1.compareTo(o2);
}
};

@@ -40,7 +40,6 @@
import java.util.logging.Level;
import org.junit.BeforeClass;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.Issue;

/**
* @author Kohsuke Kawaguchi
@@ -133,6 +132,21 @@ public void firstKey() {
}
}

@Issue("JENKINS-26690")
@Test public void headMap() {
assertEquals("[]", a.headMap(Integer.MAX_VALUE).keySet().toString());
assertEquals("[]", a.headMap(6).keySet().toString());
assertEquals("[]", a.headMap(5).keySet().toString());
assertEquals("[5]", a.headMap(4).keySet().toString());
assertEquals("[5]", a.headMap(3).keySet().toString());
assertEquals("[5, 3]", a.headMap(2).keySet().toString());
assertEquals("[5, 3]", a.headMap(1).keySet().toString());
assertEquals("[5, 3, 1]", a.headMap(0).keySet().toString());
assertEquals("[5, 3, 1]", a.headMap(-1).keySet().toString());
assertEquals("[5, 3, 1]", a.headMap(-2).keySet().toString()); // this failed
assertEquals("[5, 3, 1]", a.headMap(Integer.MIN_VALUE).keySet().toString());
}

@Test
public void lastKey() {
assertEquals(1, a.lastKey().intValue());

0 comments on commit dac7dfe

Please sign in to comment.
You can’t perform that action at this time.