blob: 02a01b792ee7e4b468811f4a055203d8b239da5b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.collections;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class ComparablesTest {
@Test
public void testMinAndMax() {
Integer i1 = 1;
Integer i2 = 2;
assertEquals(i1, Comparables.min(i1, i2));
assertEquals(i1, Comparables.min(i2, i1));
assertEquals(i2, Comparables.max(i1, i2));
assertEquals(i2, Comparables.max(i2, i1));
}
}
|