This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/master by this push:
     new bd1c69f  fixed remaining float todo.
bd1c69f is described below

commit bd1c69f87f31cf266bd2995c3473ea61d338b50d
Author: Sebastian Rühl <sru...@apache.org>
AuthorDate: Thu Feb 22 19:51:24 2018 +0100

    fixed remaining float todo.
---
 .../java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocolTest.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocolTest.java
 
b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocolTest.java
index cee94f7..6c37466 100644
--- 
a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocolTest.java
+++ 
b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocolTest.java
@@ -103,8 +103,7 @@ public class Plc4XADSProtocolTest {
                 } else if (clazz == Calendar.class) {
                     return ImmutablePair.of(calenderInstance, new byte[]{0x0, 
0x0, 0x0, 0x0, 0x4, 0x3, 0x2, 0x1});
                 } else if (clazz == Float.class) {
-                    // TODO: put a float representation on the right that is 
something other than 0
-                    return ImmutablePair.of(Float.valueOf("0"), new 
byte[]{0x0, 0x0, 0x0, 0x0});
+                    return ImmutablePair.of(Float.valueOf("1"), new 
byte[]{0x0, 0x0, (byte) 0x80, 0x3F});
                 } else if (clazz == Integer.class) {
                     return ImmutablePair.of(Integer.valueOf("1"), new 
byte[]{0x1, 0x0, 0x0, 0x0});
                 } else if (clazz == String.class) {
@@ -164,7 +163,7 @@ public class Plc4XADSProtocolTest {
             } else if 
(payloadClazzName.equals(Calendar.class.getSimpleName())) {
                 assertThat(value, equalTo(new byte[]{0x0}));
             } else if (payloadClazzName.equals(Float.class.getSimpleName())) {
-                assertThat(value, equalTo(new byte[]{0x0, 0x0, 0x0, 0x0}));
+                assertThat(value, equalTo(new byte[]{0x0, 0x0, (byte) 0x80, 
0x3F}));
             } else if (payloadClazzName.equals(Integer.class.getSimpleName())) 
{
                 assertThat(value, equalTo(new byte[]{0x1, 0x0, 0x0, 0x0}));
             } else if (payloadClazzName.equals(String.class.getSimpleName())) {
@@ -201,7 +200,7 @@ public class Plc4XADSProtocolTest {
             } else if 
(payloadClazzName.equals(Calendar.class.getSimpleName())) {
                 assertThat(value, equalTo(calenderInstance));
             } else if (payloadClazzName.equals(Float.class.getSimpleName())) {
-                assertThat(value, equalTo(Float.valueOf("0")));
+                assertThat(value, equalTo(Float.valueOf("1")));
             } else if (payloadClazzName.equals(Integer.class.getSimpleName())) 
{
                 assertThat(value, equalTo(Integer.valueOf("1")));
             } else if (payloadClazzName.equals(String.class.getSimpleName())) {

-- 
To stop receiving notification emails like this one, please contact
sru...@apache.org.

Reply via email to