-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecordSpacesTest.java
More file actions
45 lines (39 loc) · 1.08 KB
/
RecordSpacesTest.java
File metadata and controls
45 lines (39 loc) · 1.08 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
45
import org.junit.Test;
public class RecordSpacesTest {
RecordSpaces solver = new RecordSpaces();
@Test
public void test1(){
String text = " this is a sentence ";
String res = solver.reorderSpaces(text);
System.out.println(res);
// this is a sentence
}
@Test
public void test2(){
String text = " practice makes perfect";
String res = solver.reorderSpaces(text);
System.out.println(res);
// practice makes perfect
}
@Test
public void test3(){
String text = "hello world";
String res = solver.reorderSpaces(text);
System.out.println(res);
// hello world
}
@Test
public void test4(){
String text = " walks udp package into bar a";
String res = solver.reorderSpaces(text);
System.out.println(res);
// walks udp package into bar a
}
@Test
public void test5(){
String text = "a";
String res = solver.reorderSpaces(text);
System.out.println(res);
// a
}
}