// equality
System.out.printf("%s=%s\n", sequence, sequence);
assertTrue(sequence.compareTo(sequence) == 0);
assertTrue(sequence.equals(new ArraySequence(new int[] { 2, 3, 4 })));
// a bigger sequence
IntSequence bigger = new ArraySequence(new int[] { 2, 3, 5 });
System.out.printf("%s<%s\n", sequence, bigger);
assertTrue(sequence.compareTo(bigger) < 0);
System.out.printf("%s>%s\n", bigger, sequence);
assertTrue(bigger.compareTo(sequence) > 0);
// a smaller sequence
IntSequence smaller = new ArraySequence(new int[] { 1, 2, 3 });
System.out.printf("%s>%s\n", sequence, smaller);
assertTrue(sequence.compareTo(smaller) > 0);
System.out.printf("%s<%s\n", smaller, sequence);
assertTrue(smaller.compareTo(sequence) < 0);
// a shorter sequence
IntSequence shorter = new ArraySequence(new int[] { 2, 3 });
System.out.printf("%s>%s\n", sequence, shorter);
assertTrue(sequence.compareTo(shorter) > 0);
System.out.printf("%s<%s\n", shorter, sequence);
assertTrue(shorter.compareTo(sequence) < 0);
// a longer sequence
IntSequence longer = new ArraySequence(new int[] { 2, 3, 4, 5 });
System.out.printf("%s<%s\n", sequence, longer);
assertTrue(sequence.compareTo(longer) < 0);
System.out.printf("%s>%s\n", longer, sequence);
assertTrue(longer.compareTo(sequence) > 0);
}