Merge branch 'master' of https://github.com/openrocket/openrocket into parallel_staging
This commit is contained in:
commit
3537748005
@ -72,9 +72,7 @@ class BodyTubeHandler extends BaseHandler<BodyTube> {
|
||||
bodyTube.setFinish(RocksimFinishCode.fromCode(Integer.parseInt(content)).asOpenRocket());
|
||||
}
|
||||
if (RocksimCommonConstants.IS_MOTOR_MOUNT.equals(element)) {
|
||||
// silently ignore. This information is redundant now.
|
||||
// TODO: remove entirely
|
||||
//bodyTube.setMotorMount("1".equals(content));
|
||||
bodyTube.setMotorMount("1".equals(content));
|
||||
}
|
||||
if (RocksimCommonConstants.ENGINE_OVERHANG.equals(element)) {
|
||||
bodyTube.setMotorOverhang(Double.parseDouble(content) / RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
|
||||
@ -102,6 +100,7 @@ class BodyTubeHandler extends BaseHandler<BodyTube> {
|
||||
*
|
||||
* @return BULK
|
||||
*/
|
||||
@Override
|
||||
public Material.Type getMaterialType() {
|
||||
return Material.Type.BULK;
|
||||
}
|
||||
|
@ -69,9 +69,7 @@ class InnerBodyTubeHandler extends PositionDependentHandler<InnerTube> {
|
||||
bodyTube.setLength(Double.parseDouble(content) / RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
|
||||
}
|
||||
if (RocksimCommonConstants.IS_MOTOR_MOUNT.equals(element)) {
|
||||
// silently ignore. This information is redundant now.
|
||||
// TODO: remove entirely
|
||||
//bodyTube.setMotorMount("1".equals(content));
|
||||
bodyTube.setMotorMount("1".equals(content));
|
||||
}
|
||||
if (RocksimCommonConstants.ENGINE_OVERHANG.equals(element)) {
|
||||
bodyTube.setMotorOverhang(Double.parseDouble(content) / RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
|
||||
|
@ -114,7 +114,7 @@ public abstract class Unit {
|
||||
double sign = Math.signum(val);
|
||||
val = Math.abs(val);
|
||||
double mul = 1.0;
|
||||
while (val < 100) {
|
||||
while (val < 100 && mul < 1000) {
|
||||
mul *= 10;
|
||||
val *= 10;
|
||||
}
|
||||
|
@ -13,29 +13,6 @@ import org.junit.Test;
|
||||
|
||||
public class DocumentConfigTest extends BaseTestCase {
|
||||
|
||||
/**
|
||||
* Check that unit tests exist for all supported OR file versions.
|
||||
*
|
||||
* This test is here to remind future developers to update the unit tests after adding a file version.
|
||||
*
|
||||
* Whenever a new file version is created, this test needs to be updated after new unit tests
|
||||
* are created in OpenRocketSaver.java for the new file version.
|
||||
*/
|
||||
@Test
|
||||
public void testAllVersionsTested() {
|
||||
|
||||
// Update this after creating new unit tests in OpenRocketSaver for a new OR file version
|
||||
String[] testedVersionsStr = { "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7" };
|
||||
|
||||
List<String> supportedVersions = Arrays.asList(DocumentConfig.SUPPORTED_VERSIONS);
|
||||
List<String> testedVersions = Arrays.asList(testedVersionsStr);
|
||||
|
||||
for (String supportedVersion : supportedVersions) {
|
||||
String msg = String.format("No unit tests exist for OpenRocket file version %s", supportedVersion);
|
||||
assertTrue(msg, testedVersions.contains(supportedVersion));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFileVersionDivisor() {
|
||||
assertEquals(OpenRocketSaver.FILE_VERSION_DIVISOR, DocumentConfig.FILE_VERSION_DIVISOR);
|
||||
|
@ -22,9 +22,12 @@ public class ComponentCompare {
|
||||
"getStageSeparationConfiguration",
|
||||
"getMotorConfiguration",
|
||||
"getIgnitionConfiguration",
|
||||
"getMotorIterator",
|
||||
"getConfigSet",
|
||||
"getSeparationConfigurations",
|
||||
// Rocket specific methods:
|
||||
"getModID", "getMassModID", "getAerodynamicModID", "getTreeModID", "getFunctionalModID",
|
||||
"getFlightConfigurationIDs", "getDefaultConfiguration", "getMotorMounts"
|
||||
"getFlightConfigurationIDs", "getDefaultConfiguration", "getMotorMounts", "getStageList", "getTopmostStage", "getBottomCoreStage"
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user