We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d705a5 commit ca0229bCopy full SHA for ca0229b
src/main/java/com/ctci/arraysandstrings/StringCompressionUnitTest.java
@@ -0,0 +1,28 @@
1
+package com.ctci.arraysandstrings;
2
+
3
+import static org.hamcrest.CoreMatchers.nullValue;
4
5
+import org.junit.Before;
6
+import org.junit.Test;
7
8
+public class StringCompressionUnitTest {
9
+ public static String str1;
10
11
+ public static String str2;
12
13
+ public static String str3;
14
15
+ @Before
16
+ public void setup() {
17
+ str1 = "aaabbccaaaaa";
18
+ str2 = "adddcc2";
19
+ str3 = "";
20
+ }
21
22
+ @Test
23
+ public void testCompressStr() {
24
+ System.out.println(str1 + ": " + StringCompression.compressString(str1));
25
+ System.out.println(str2 + ": " + StringCompression.compressString(str2));
26
+ System.out.println(str3 + ": " + StringCompression.compressString(str3));
27
28
+}
0 commit comments