blob: 0ec9cd2d8f7fbe8b26f0e31d29e9bac6e5a4e771 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2018 Yahoo Holdings. 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));
}
}
|