From 3f84149cb85d56ef0b0a4ec82c066d38c314af7e Mon Sep 17 00:00:00 2001 From: Sibo Van Gool Date: Fri, 18 Jun 2021 22:35:51 +0200 Subject: [PATCH] Updated unit tests to match new lug rotation --- core/test/net/sf/openrocket/rocketcomponent/LaunchLugTest.java | 2 +- core/test/net/sf/openrocket/rocketcomponent/RocketTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/test/net/sf/openrocket/rocketcomponent/LaunchLugTest.java b/core/test/net/sf/openrocket/rocketcomponent/LaunchLugTest.java index 79dd28f05..36c3d90bb 100644 --- a/core/test/net/sf/openrocket/rocketcomponent/LaunchLugTest.java +++ b/core/test/net/sf/openrocket/rocketcomponent/LaunchLugTest.java @@ -22,7 +22,7 @@ public class LaunchLugTest extends BaseTestCase { lug.setInstanceCount(2); double expX = 0.111 + body.getLocations()[0].x; - double expR = body.getOuterRadius()+lug.getOuterRadius(); + double expR = -(body.getOuterRadius()+lug.getOuterRadius()); Coordinate expPos = new Coordinate( expX, expR, 0, 0); Coordinate actPos[] = lug.getLocations(); assertEquals(" LaunchLug has the wrong x value: ", expPos.x, actPos[0].x, EPSILON); diff --git a/core/test/net/sf/openrocket/rocketcomponent/RocketTest.java b/core/test/net/sf/openrocket/rocketcomponent/RocketTest.java index e75146eca..2cbe37116 100644 --- a/core/test/net/sf/openrocket/rocketcomponent/RocketTest.java +++ b/core/test/net/sf/openrocket/rocketcomponent/RocketTest.java @@ -89,7 +89,7 @@ public class RocketTest extends BaseTestCase { } LaunchLug lugs = (LaunchLug)body.getChild(1); - expLoc = new Coordinate(0.181, 0.015, 0); + expLoc = new Coordinate(0.181, -0.015, 0); assertThat(lugs.getName()+" have incorrect count: ", lugs.getInstanceCount(), equalTo(1)); actLocs = lugs.getComponentLocations(); { // singular instance: