diff options
author | wisberg <wisberg> | 2003-04-19 08:14:00 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-04-19 08:14:00 +0000 |
commit | 5d8dd96b88f02386f3c2bb587e4846a691b01d36 (patch) | |
tree | 4afd87b6ee81b5ce66ca84ede2ad60d766eb16bd /bridge/testsrc | |
parent | 7fbdd52e8f5a4a24aa56468612a718b2ada7bf6f (diff) | |
download | aspectj-5d8dd96b88f02386f3c2bb587e4846a691b01d36.tar.gz aspectj-5d8dd96b88f02386f3c2bb587e4846a691b01d36.zip |
More readable API than comparator for common floor operation (semantics-preserving)
Diffstat (limited to 'bridge/testsrc')
-rw-r--r-- | bridge/testsrc/org/aspectj/bridge/MessageTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bridge/testsrc/org/aspectj/bridge/MessageTest.java b/bridge/testsrc/org/aspectj/bridge/MessageTest.java index 61488c8ef..8688f44b4 100644 --- a/bridge/testsrc/org/aspectj/bridge/MessageTest.java +++ b/bridge/testsrc/org/aspectj/bridge/MessageTest.java @@ -17,6 +17,7 @@ import java.io.File; import java.util.Arrays; import java.util.BitSet; import java.util.Comparator; +import java.util.Iterator; import java.util.List; import java.util.ListIterator; @@ -70,6 +71,23 @@ public class MessageTest extends TestCase { checkListOrder(IMessage.KINDS, IMessage.Kind.COMPARATOR); } + public void testKind_isSameOrLessThan() { + IMessage.Kind last; + IMessage.Kind next = null; + for (Iterator iter = IMessage.KINDS.iterator(); iter.hasNext();) { + last = next; + next = (IMessage.Kind) iter.next(); + if (null == last) { + continue; + } + String label = "last: " + last + " next: " + next; + assertTrue(label, !next.isSameOrLessThan(null)); + assertTrue(label, !next.isSameOrLessThan(last)); + assertTrue(label, last.isSameOrLessThan(next)); + assertTrue(label, next.isSameOrLessThan(next)); + } + } + public void testMessageHandler() { boolean handleMessageResult = true; checkEmptyMessageHolder(new MessageHandler(handleMessageResult), handleMessageResult); |