package com.perforce.cvs.unit.parser;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import com.perforce.cvs.parser.rcstypes.RcsObjectNum;
import com.perforce.cvs.parser.rcstypes.RcsObjectString;
import com.perforce.cvs.parser.rcstypes.RcsObjectTag;
public class TestRcsObjects {
@Test
public void case001() throws Exception {
String str = "foo:1.2";
RcsObjectTag id = new RcsObjectTag(str);
String ids = id.toString();
Assert.assertTrue(ids.contentEquals(str));
}
@Test
public void case002() throws Exception {
String str = "@test@";
RcsObjectString msg = new RcsObjectString(str);
Assert.assertTrue(msg.toString().contentEquals(str));
}
@Test
public void case003() throws Exception {
String str = "@@";
RcsObjectString msg = new RcsObjectString(str);
Assert.assertTrue(msg.getString().contentEquals(""));
}
@Test
public void case004() throws Exception {
String str = "@foo@@bar@";
RcsObjectString msg = new RcsObjectString(str);
Assert.assertTrue(msg.getString().contentEquals("foo@bar"));
}
@Test
public void case005() throws Exception {
RcsObjectNum a = new RcsObjectNum("1.7");
List<Integer> l = new ArrayList<Integer>();
l.add(1);
l.add(7);
RcsObjectNum b = new RcsObjectNum(l);
Assert.assertTrue(a.equals(b));
}
}
# |
Change |
User |
Description |
Committed |
|
#1
|
26953 |
Paul Allen |
Move //guest/perforce_software/p4convert to //guest/perforce_software/p4convert/main |
|
|
//guest/perforce_software/p4convert/src/test/java/com/perforce/cvs/unit/parser/TestRcsObjects.java |
#1
|
13920 |
Paul Allen |
copy part 2 (no errors) |
|
|
//guest/paul_allen/p4convert-maven/src/test/java/com/perforce/cvs/unit/parser/TestRcsObjects.java |
#1
|
13878 |
Paul Allen |
Move test/ to src/test/java |
|
|
//guest/paul_allen/p4convert-maven/test/com/perforce/cvs/unit/parser/TestRcsObjects.java |
#1
|
13873 |
Paul Allen |
Branching using p4convert-maven |
|
|
//guest/perforce_software/p4convert/test/com/perforce/cvs/unit/parser/TestRcsObjects.java |
#1
|
9807 |
Paul Allen |
Initial import of p4-convert (from change 894340) |
|
|