Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Theosakamg committed Jul 14, 2017
1 parent 3c27f7a commit 156253a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions rcljava/src/main/java/org/ros2/rcljava/RCLJava.java
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,7 @@ public static long convertQoSProfileToHandle(final QoSProfile qosProfile) {
int durability = qosProfile.getDurability().getValue();
boolean avoidRos = qosProfile.getAvoidRosNamespaceConventions();

RCLJava.logger.debug("Convert QosProfile...");

// RCLJava.logger.debug("Convert QosProfile...");
return RCLJava.nativeConvertQoSProfileToHandle(history, depth, reliability, durability, avoidRos);
}

Expand Down
4 changes: 2 additions & 2 deletions rcljava/src/main/java/org/ros2/rcljava/node/NativeNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public NativeNode(final String defaultName) {
* @param defaultName name of node.
*/
public NativeNode(final String namespace, final String defaultName, final String[] args) {
NativeNode.logger.debug("Create Node stack : " + defaultName);
NativeNode.logger.debug("Create Node stack...");

if (!RCLJava.isInitialized()) {
throw new NotInitializedException();
Expand Down Expand Up @@ -256,7 +256,7 @@ public NativeNode(final String namespace, final String defaultName, final String
if (nodeHandle==0) throw new NullPointerException("Node Handle is not define !");
this.nodeHandle = nodeHandle;

NativeNode.logger.debug("Create Node stack : " + GraphName.getFullName(this.nameSpace, this.name));
NativeNode.logger.debug("Created Node stack : " + GraphName.getFullName(this.nameSpace, this.name));

if (args != null) {
for (String arg : args) {
Expand Down
14 changes: 7 additions & 7 deletions rcljava/src/test/java/org/ros2/rcljava/MessageGeometryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ public final void testPubPoint() throws Exception {

Point msg = new Point();
msg.setX(10.0d);
msg.setX(20.0d);
msg.setX(30.0d);
msg.setY(20.0d);
msg.setZ(30.0d);

Point value = this.pubSubTest(msg);
assertEquals(10.0d, value.getX(), 0.1d);
assertEquals(10.0d, value.getY(), 0.1d);
assertEquals(10.0d, value.getZ(), 0.1d);
assertEquals(20.0d, value.getY(), 0.1d);
assertEquals(30.0d, value.getZ(), 0.1d);
}

@Test
Expand Down Expand Up @@ -183,9 +183,9 @@ public final void testPubPose() throws Exception {
msg.getOrientation().setX(20.0d);
msg.getOrientation().setY(30.0d);
msg.getOrientation().setZ(40.0d);
msg.getPosition().setX(50.0D);
msg.getPosition().setX(60.0D);
msg.getPosition().setX(70.0D);
msg.getPosition().setX(50.0d);
msg.getPosition().setY(60.0d);
msg.getPosition().setZ(70.0d);

Pose value = this.pubSubTest(msg);
assertEquals(10.0d, value.getOrientation().getW(), 0.1d);
Expand Down

0 comments on commit 156253a

Please sign in to comment.