-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBBTests.java
More file actions
38 lines (31 loc) · 863 Bytes
/
BBTests.java
File metadata and controls
38 lines (31 loc) · 863 Bytes
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
package spa;
import static org.junit.Assert.*;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class BBTests
{
@Test
public void filenameTest()
{
Snapshot s = Utils.getSSFromFilename("f10000213-e370394352");
assertEquals(370394352, s.evid);
assertEquals(10000213, s.sfid);
String sfid = Utils.getSFID("f12345-e7890.java");
assertEquals("12345", sfid);
}
@Test
public void quoteTest()
{
assertEquals("hallo", Utils.remQuotes("\"hallo\""));
}
@Test
public void solvedTest()
{
Integer [] test1 = new Integer [] {2,1,3,0,0,4,2};
List<Integer> l = new ArrayList<>(Arrays.asList(test1));
assertEquals(6, Fixing.solved(l));
assertEquals(8, Fixing.appeared(l));
}
}