-
Notifications
You must be signed in to change notification settings - Fork 2
/
BiggerNumberTest.java
27 lines (26 loc) · 1.41 KB
/
BiggerNumberTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import org.junit.runners.JUnit4;
public class BiggerNumberTest {
@Test
public void basicTests() {
// assertEquals(21, BiggerNumber.nextBiggerNumber(12));
assertEquals(-1, BiggerNumber.nextBiggerNumber(21));
assertEquals(-1, BiggerNumber.nextBiggerNumber(531));
assertEquals(-1, BiggerNumber.nextBiggerNumber(7210));
assertEquals(21, BiggerNumber.nextBiggerNumber(12));
assertEquals(531, BiggerNumber.nextBiggerNumber(513));
assertEquals(2071, BiggerNumber.nextBiggerNumber(2017));
assertEquals(441, BiggerNumber.nextBiggerNumber(414));
assertEquals(414, BiggerNumber.nextBiggerNumber(144));
assertEquals(279197752, BiggerNumber.nextBiggerNumber(279197725));
assertEquals(42977160, BiggerNumber.nextBiggerNumber(42977106));
assertEquals(134697784, BiggerNumber.nextBiggerNumber(134697748));
assertEquals(74079109, BiggerNumber.nextBiggerNumber(74079091));
assertEquals(1166896403, BiggerNumber.nextBiggerNumber(1166896340));
assertEquals(1166896403, BiggerNumber.nextBiggerNumber(1166896340));
assertEquals(1166896403, BiggerNumber.nextBiggerNumber(1166896340));
assertEquals(1166896403, BiggerNumber.nextBiggerNumber(1166896340));
assertEquals(1166896403, BiggerNumber.nextBiggerNumber(1166896340));
}
}