| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package footleg.cavesurvey.regression; |
| 20 |
|
| 21 |
import static org.junit.Assert.*; |
| 22 |
|
| 23 |
import java.io.FileNotFoundException; |
| 24 |
import java.text.ParseException; |
| 25 |
|
| 26 |
import org.junit.Test; |
| 27 |
|
| 28 |
import footleg.cavesurvey.converter.CaveConverter.CmdlineOpt; |
| 29 |
import footleg.cavesurvey.converter.CaveConverter.CmdlineSplaysOpt; |
| 30 |
import footleg.cavesurvey.tools.TestHelper; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
public class PocketTopoToToporobotTest { |
| 44 |
|
| 45 |
@Test |
| 46 |
public void testPocketTopoToToporobotGourAven() throws ParseException, FileNotFoundException { |
| 47 |
|
| 48 |
String fileCompare = RunFileConverter.convertPocketTopoToToporobot( "GourAven", CmdlineSplaysOpt.Default, CmdlineOpt.T, |
| 49 |
RunFileConverter.defaultCharset ); |
| 50 |
assertEquals("Comparing GourAven toporobot file from PocketTopo with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 51 |
} |
| 52 |
|
| 53 |
@Test |
| 54 |
public void testPocketTopoToToporobotHSC() throws ParseException, FileNotFoundException { |
| 55 |
|
| 56 |
String fileCompare = RunFileConverter.convertPocketTopoToToporobot( "HSC", CmdlineSplaysOpt.Default, CmdlineOpt.T, |
| 57 |
RunFileConverter.defaultCharset ); |
| 58 |
assertEquals("Comparing HSC toporobot file from PocketTopo with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 59 |
} |
| 60 |
|
| 61 |
@Test |
| 62 |
public void testPocketTopoToToporobotStomps() throws ParseException, FileNotFoundException { |
| 63 |
|
| 64 |
String fileCompare = RunFileConverter.convertPocketTopoToToporobot( "Stomps", CmdlineSplaysOpt.Default, CmdlineOpt.T, |
| 65 |
RunFileConverter.defaultCharset ); |
| 66 |
assertEquals("Comparing Stomps toporobot file from PocketTopo with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 67 |
} |
| 68 |
|
| 69 |
@Test |
| 70 |
public void testPocketTopoToToporobotUzuGour() throws ParseException, FileNotFoundException { |
| 71 |
|
| 72 |
String fileCompare = RunFileConverter.convertPocketTopoToToporobot( "Uzu-Gour", CmdlineSplaysOpt.Default, CmdlineOpt.T, |
| 73 |
RunFileConverter.defaultCharset ); |
| 74 |
assertEquals("Comparing Uzu-Gour toporobot file from PocketTopo with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 75 |
} |
| 76 |
|
| 77 |
@Test |
| 78 |
public void testPocketTopoToToporobotSloppy2ZigZags() throws ParseException, FileNotFoundException { |
| 79 |
|
| 80 |
boolean oldJRE = TestHelper.jreRoundingBug(); |
| 81 |
RunFileConverter.setOldJRE(oldJRE); |
| 82 |
|
| 83 |
String fileCompare = RunFileConverter.convertPocketTopoToToporobot( "Sloppy2ZigZags", CmdlineSplaysOpt.Default, CmdlineOpt.T, |
| 84 |
RunFileConverter.defaultCharset ); |
| 85 |
|
| 86 |
RunFileConverter.setOldJRE(false); |
| 87 |
assertEquals("Comparing Sloppy2ZigZags toporobot file from PocketTopo with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 88 |
} |
| 89 |
|
| 90 |
@Test |
| 91 |
public void testPocketTopoToToporobotTripComment() throws ParseException, FileNotFoundException { |
| 92 |
|
| 93 |
String fileCompare = RunFileConverter.convertPocketTopoToToporobot( "TripComment", CmdlineSplaysOpt.Default, CmdlineOpt.T, |
| 94 |
RunFileConverter.defaultCharset ); |
| 95 |
assertEquals("Comparing TripComment toporobot file from PocketTopo with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 96 |
} |
| 97 |
|
| 98 |
} |