forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1209Test.java
More file actions
44 lines (34 loc) · 1.3 KB
/
_1209Test.java
File metadata and controls
44 lines (34 loc) · 1.3 KB
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
package com.fishercoder;
import com.fishercoder.solutions._1209;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class _1209Test {
private static _1209.Solution1 solution1;
private static _1209.Solution2 solution2;
@BeforeClass
public static void setup() {
solution1 = new _1209.Solution1();
solution2 = new _1209.Solution2();
}
@Test
public void test1() {
assertEquals("abcd", solution1.removeDuplicates("abcd", 2));
assertEquals("abcd", solution2.removeDuplicates("abcd", 2));
}
@Test
public void test2() {
assertEquals("aa", solution1.removeDuplicates("deeedbbcccbdaa", 3));
assertEquals("aa", solution2.removeDuplicates("deeedbbcccbdaa", 3));
}
@Test
public void test3() {
assertEquals("ps", solution1.removeDuplicates("pbbcggttciiippooaais", 2));
assertEquals("ps", solution2.removeDuplicates("pbbcggttciiippooaais", 2));
}
@Test
public void test4() {
assertEquals("ghayqgq", solution1.removeDuplicates("ghanyhhhhhttttttthhyyyyyynnnnnnyqkkkkkkkrrrrrrjjjjjjjryyyyyyfffffffygq", 7));
assertEquals("ghayqgq", solution2.removeDuplicates("ghanyhhhhhttttttthhyyyyyynnnnnnyqkkkkkkkrrrrrrjjjjjjjryyyyyyfffffffygq", 7));
}
}