forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_352Test.java
45 lines (36 loc) · 1.04 KB
/
_352Test.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.fishercoder;
import com.fishercoder.common.classes.Interval;
import com.fishercoder.common.utils.CommonUtils;
import com.fishercoder.solutions._352;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.List;
/**
* Created by stevesun on 6/1/17.
*/
public class _352Test {
private static _352.SummaryRanges test;
private static List<Interval> actual;
@BeforeClass
public static void setup(){
test = new _352.SummaryRanges();
}
@Test
public void test1(){
test.addNum(1);
actual = test.getIntervals();
CommonUtils.printIntervals(actual);
test.addNum(3);
actual = test.getIntervals();
CommonUtils.printIntervals(actual);
test.addNum(7);
actual = test.getIntervals();
CommonUtils.printIntervals(actual);
test.addNum(2);
actual = test.getIntervals();
CommonUtils.printIntervals(actual);
test.addNum(6);
actual = test.getIntervals();
CommonUtils.printIntervals(actual);
}
}