You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2024/09/30 15:58:36 UTC
(plc4x) 05/06: test(plc4go/spi): fix box rendering artifacts
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit e8224918f18f50cb45b9ea03b3a922de7ac2a304
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Sep 30 17:57:36 2024 +0200
test(plc4go/spi): fix box rendering artifacts
---
plc4go/internal/cbus/Connection_test.go | 10 +-
plc4go/internal/cbus/MessageCodec_test.go | 6 +-
plc4go/internal/cbus/Tag_test.go | 10 +-
plc4go/internal/s7/s7Io_test.go | 217 ++++++++++++------------
plc4go/spi/transactions/completedFuture_test.go | 6 +-
5 files changed, 123 insertions(+), 126 deletions(-)
diff --git a/plc4go/internal/cbus/Connection_test.go b/plc4go/internal/cbus/Connection_test.go
index ff9180a1ca..df4e61ccb5 100644
--- a/plc4go/internal/cbus/Connection_test.go
+++ b/plc4go/internal/cbus/Connection_test.go
@@ -505,11 +505,11 @@ func TestConnection_String(t *testing.T) {
name: "a string",
want: `
╔═Connection══════════════════════════════════════════════════════════════════════════════════════════════╗
-║╔═defaultConnection═══════╗╔═alphaGenerator════════════════════╗ ║
-║║╔═defaultTtl╗╔═connected╗║║╔═AlphaGenerator/currentAlpha═════╗║ ║
-║║║ 10s ║║ b0 false ║║║║ 0x67 'g' ║║ ║
-║║╚═══════════╝╚══════════╝║║╚═════════════════════════════════╝║ ║
-║╚═════════════════════════╝╚═══════════════════════════════════╝ ║
+║╔═defaultConnection═══════╗╔═alphaGenerator═══════════════╗ ║
+║║╔═defaultTtl╗╔═connected╗║║╔═AlphaGenerator/currentAlpha╗║ ║
+║║║ 10s ║║ b0 false ║║║║ 0x67 'g' ║║ ║
+║║╚═══════════╝╚══════════╝║║╚════════════════════════════╝║ ║
+║╚═════════════════════════╝╚══════════════════════════════╝ ║
║╔═configuration═════════════════════════════════════════════════════════════════════════════════════════╗║
║║╔═Configuration═══════════════════════════════════════════════════════════════════════════════════════╗║║
║║║╔═srchk══╗╔═exstat═╗╔═pun════╗╔═localSal╗╔═pcn════╗╔═idmon══╗╔═monitor╗╔═smart══╗╔═xonXoff╗╔═connect╗║║║
diff --git a/plc4go/internal/cbus/MessageCodec_test.go b/plc4go/internal/cbus/MessageCodec_test.go
index 79c8297031..54e849be97 100644
--- a/plc4go/internal/cbus/MessageCodec_test.go
+++ b/plc4go/internal/cbus/MessageCodec_test.go
@@ -865,9 +865,9 @@ func TestMessageCodec_String(t *testing.T) {
║║║ b0 false ║ ║ ║
║║╚═══════════════════════════════╝ ║ ║
║╚═══════════════════════════════════════════════════════════════════════════════════════════════════════╝ ║
-║╔═requestContext/RequestContext/sendIdentifyRequestBefore═════════════════════════════════════════════════════╗ ║
-║║ b1 true ║ ║
-║╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════╝ ║
+║╔═requestContext/RequestContext/sendIdentifyRequestBefore╗ ║
+║║ b1 true ║ ║
+║╚════════════════════════════════════════════════════════╝ ║
║╔═cbusOptions/CBusOptions═══════════════════════════════════════════════════════════╗╔═monitoredMMIs╗╔═monitoredSALs╗║
║║╔═connect╗╔═smart═╗╔═idmon═╗╔═exstat╗╔═monitor╗╔═monall╗╔═pun═══╗╔═pcn═══╗╔═srchk═╗║║ 0 element(s) ║║ 0 element(s) ║║
║║║b1 true ║║b1 true║║b1 true║║b1 true║║b1 true ║║b1 true║║b1 true║║b1 true║║b1 true║║╚══════════════╝╚══════════════╝║
diff --git a/plc4go/internal/cbus/Tag_test.go b/plc4go/internal/cbus/Tag_test.go
index 8a3ec7ad32..e5b6fd5224 100644
--- a/plc4go/internal/cbus/Tag_test.go
+++ b/plc4go/internal/cbus/Tag_test.go
@@ -810,9 +810,9 @@ func Test_calIdentifyTag_String(t *testing.T) {
{
name: "default to string",
want: `
-╔═STATUS/Attribute╗
+╔═STATUS/Attribute══╗
║0x00 0 Manufacturer║
-╚═════════════════╝`[1:],
+╚═══════════════════╝`[1:],
},
}
for _, tt := range tests {
@@ -2278,9 +2278,9 @@ func Test_salTag_String(t *testing.T) {
{
name: "default to string",
want: `
-╔═STATUS/ApplicationIdContainer═════╗
-║ 0x00 0 RESERVED_00 ║
-╚═══════════════════════════════════╝`[1:],
+╔═STATUS/ApplicationIdContainer╗
+║ 0x00 0 RESERVED_00 ║
+╚══════════════════════════════╝`[1:],
},
}
for _, tt := range tests {
diff --git a/plc4go/internal/s7/s7Io_test.go b/plc4go/internal/s7/s7Io_test.go
index 3998af4c2b..dab805e243 100644
--- a/plc4go/internal/s7/s7Io_test.go
+++ b/plc4go/internal/s7/s7Io_test.go
@@ -130,44 +130,43 @@ func TestS7MessageBytes(t *testing.T) {
║║║╚══════════════════════════════════════════════════════════════════════════════════════════╝ ║║║
║║╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════╝║║
║╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝║
-╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
-`,
+╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝`,
wantStringSerializedCompact: `
-╔═TPKTPacket═════════════════════════════════════════════════════════════════════════════════════╗
-║╔═protocolId╗╔═reserved╗╔═len═════╗ ║
-║║ 0x03 3 ║║ 0x00 0 ║║0x001d 29║ ║
-║╚═══════════╝╚═════════╝╚═════════╝ ║
-║╔═payload/COTPPacket═══════════════════════════════════════════════════════════════════════════╗║
-║║╔═headerLength╗╔═tpduCode╗╔═COTPPacketData═════╗ ║║
-║║║ 0x05 5 ║║0xf0 240 ║║╔═eot════╗╔═tpduRef╗║ ║║
-║║╚═════════════╝╚═════════╝║║b0 false║║ 0xd 13 ║║ ║║
-║║ ║╚════════╝╚════════╝║ ║║
-║║ ╚════════════════════╝ ║║
-║║╔═parameters/COTPParameter════════════════════════════════════════════════════════════╗ ║║
-║║║╔═parameterType╗╔═parameterLength╗╔═COTPParameterTpduSize/tpduSize/COTPTpduSize═════╗║ ║║
-║║║║ 0xc0 192 ║║ 0x01 1 ║║ 0x0c 12 SIZE_4096 ║║ ║║
-║║║╚══════════════╝╚════════════════╝╚═════════════════════════════════════════════════╝║ ║║
-║║╚═════════════════════════════════════════════════════════════════════════════════════╝ ║║
-║║╔═payload/S7Message══════════════════════════════════════════════════════════════════════════╗║║
-║║║╔═protocolId╗╔═messageType╗╔═reserved╗╔═tpduReference╗╔═parameterLength╗╔═payloadLength╗ ║║║
-║║║║ 0x32 50 ║║ 0x03 3 ║║0x0000 0 ║║ 0x000b 11 ║║ 0x0002 2 ║║ 0x0005 5 ║ ║║║
-║║║╚═══════════╝╚════════════╝╚═════════╝╚══════════════╝╚════════════════╝╚══════════════╝ ║║║
-║║║╔═S7MessageResponseData═══╗╔═parameter/S7Parameter═══════════════════════════════════╗ ║║║
-║║║║╔═errorClass╗╔═errorCode╗║║╔═parameterType╗╔═S7ParameterReadVarResponse/numItems═══╗║ ║║║
-║║║║║ 0x00 0 ║║ 0x00 0 ║║║║ 0x04 4 ║║ 0x01 1 ║║ ║║║
-║║║║╚═══════════╝╚══════════╝║║╚══════════════╝╚═══════════════════════════════════════╝║ ║║║
-║║║╚═════════════════════════╝╚═════════════════════════════════════════════════════════╝ ║║║
-║║║╔═payload/S7Payload/S7PayloadReadVarResponse/items/S7VarPayloadDataItem════════════════════╗║║║
-║║║║╔═returnCode/DataTransportErrorCode════════════╗╔═transportSize/DataTransportSize════════╗║║║║
-║║║║║ 0xff 255 OK ║║ 0x03 3 BIT ║║║║║
-║║║║╚══════════════════════════════════════════════╝╚════════════════════════════════════════╝║║║║
-║║║║╔═dataLength╗╔═data═══════════════════════════════════════╗ ║║║║
-║║║║║ 0x0001 1 ║║0|01 '. '║ ║║║║
-║║║║╚═══════════╝╚════════════════════════════════════════════╝ ║║║║
-║║║╚══════════════════════════════════════════════════════════════════════════════════════════╝║║║
-║║╚════════════════════════════════════════════════════════════════════════════════════════════╝║║
-║╚══════════════════════════════════════════════════════════════════════════════════════════════╝║
-╚════════════════════════════════════════════════════════════════════════════════════════════════╝
+╔═TPKTPacket═════════════════════════════════════════════════════════════════════════════════╗
+║╔═protocolId╗╔═reserved╗╔═len═════╗ ║
+║║ 0x03 3 ║║ 0x00 0 ║║0x001d 29║ ║
+║╚═══════════╝╚═════════╝╚═════════╝ ║
+║╔═payload/COTPPacket═══════════════════════════════════════════════════════════════════════╗║
+║║╔═headerLength╗╔═tpduCode╗╔═COTPPacketData═════╗ ║║
+║║║ 0x05 5 ║║0xf0 240 ║║╔═eot════╗╔═tpduRef╗║ ║║
+║║╚═════════════╝╚═════════╝║║b0 false║║ 0xd 13 ║║ ║║
+║║ ║╚════════╝╚════════╝║ ║║
+║║ ╚════════════════════╝ ║║
+║║╔═parameters/COTPParameter═══════════════════════════════════════════════════════╗ ║║
+║║║╔═parameterType╗╔═parameterLength╗╔═COTPParameterTpduSize/tpduSize/COTPTpduSize╗║ ║║
+║║║║ 0xc0 192 ║║ 0x01 1 ║║ 0x0c 12 SIZE_4096 ║║ ║║
+║║║╚══════════════╝╚════════════════╝╚════════════════════════════════════════════╝║ ║║
+║║╚════════════════════════════════════════════════════════════════════════════════╝ ║║
+║║╔═payload/S7Message══════════════════════════════════════════════════════════════════════╗║║
+║║║╔═protocolId╗╔═messageType╗╔═reserved╗╔═tpduReference╗╔═parameterLength╗╔═payloadLength╗║║║
+║║║║ 0x32 50 ║║ 0x03 3 ║║0x0000 0 ║║ 0x000b 11 ║║ 0x0002 2 ║║ 0x0005 5 ║║║║
+║║║╚═══════════╝╚════════════╝╚═════════╝╚══════════════╝╚════════════════╝╚══════════════╝║║║
+║║║╔═S7MessageResponseData═══╗╔═parameter/S7Parameter════════════════════════════════╗ ║║║
+║║║║╔═errorClass╗╔═errorCode╗║║╔═parameterType╗╔═S7ParameterReadVarResponse/numItems╗║ ║║║
+║║║║║ 0x00 0 ║║ 0x00 0 ║║║║ 0x04 4 ║║ 0x01 1 ║║ ║║║
+║║║║╚═══════════╝╚══════════╝║║╚══════════════╝╚════════════════════════════════════╝║ ║║║
+║║║╚═════════════════════════╝╚══════════════════════════════════════════════════════╝ ║║║
+║║║╔═payload/S7Payload/S7PayloadReadVarResponse/items/S7VarPayloadDataItem═════════════╗ ║║║
+║║║║╔═returnCode/DataTransportErrorCode╗╔═transportSize/DataTransportSize╗╔═dataLength╗║ ║║║
+║║║║║ 0xff 255 OK ║║ 0x03 3 BIT ║║ 0x0001 1 ║║ ║║║
+║║║║╚══════════════════════════════════╝╚════════════════════════════════╝╚═══════════╝║ ║║║
+║║║║╔═data═══════════════════════════════════════╗ ║ ║║║
+║║║║║0|01 '. '║ ║ ║║║
+║║║║╚════════════════════════════════════════════╝ ║ ║║║
+║║║╚═══════════════════════════════════════════════════════════════════════════════════╝ ║║║
+║║╚════════════════════════════════════════════════════════════════════════════════════════╝║║
+║╚══════════════════════════════════════════════════════════════════════════════════════════╝║
+╚════════════════════════════════════════════════════════════════════════════════════════════╝
`,
wantStringXml: `
<TPKTPacket>
@@ -514,79 +513,77 @@ func TestS7MessageBytes(t *testing.T) {
║║║╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝║║║
║║╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝║║
║╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝║
-╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
-`,
+╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝`,
wantStringSerializedCompact: `
-╔═TPKTPacket═════════════════════════════════════════════════════════════════════════════════════════════════╗
-║╔═protocolId╗╔═reserved╗╔═len══════╗ ║
-║║ 0x03 3 ║║ 0x00 0 ║║0x0066 102║ ║
-║╚═══════════╝╚═════════╝╚══════════╝ ║
-║╔═payload/COTPPacket═══════════════════════════════════════════════════════════════════════════════════════╗║
-║║╔═headerLength╗╔═tpduCode╗╔═COTPPacketData═════╗ ║║
-║║║ 0x05 5 ║║0xf0 240 ║║╔═eot════╗╔═tpduRef╗║ ║║
-║║╚═════════════╝╚═════════╝║║b0 false║║ 0xd 13 ║║ ║║
-║║ ║╚════════╝╚════════╝║ ║║
-║║ ╚════════════════════╝ ║║
-║║╔═parameters/COTPParameter════════════════════════════════════════════════════════════╗ ║║
-║║║╔═parameterType╗╔═parameterLength╗╔═COTPParameterTpduSize/tpduSize/COTPTpduSize═════╗║ ║║
-║║║║ 0xc0 192 ║║ 0x01 1 ║║ 0x0c 12 SIZE_4096 ║║ ║║
-║║║╚══════════════╝╚════════════════╝╚═════════════════════════════════════════════════╝║ ║║
-║║╚═════════════════════════════════════════════════════════════════════════════════════╝ ║║
-║║╔═payload/S7Message══════════════════════════════════════════════════════════════════════════════════════╗║║
-║║║╔═protocolId╗╔═messageType╗╔═reserved╗╔═tpduReference╗╔═parameterLength╗╔═payloadLength╗ ║║║
-║║║║ 0x32 50 ║║ 0x01 1 ║║0x0000 0 ║║ 0x000d 13 ║║ 0x000e 14 ║║ 0x0044 68 ║ ║║║
-║║║╚═══════════╝╚════════════╝╚═════════╝╚══════════════╝╚════════════════╝╚══════════════╝ ║║║
-║║║╔═parameter/S7Parameter════════════════════════════════════════════════════════════════════════════════╗║║║
-║║║║╔═parameterType╗ ║║║║
-║║║║║ 0x05 5 ║ ║║║║
-║║║║╚══════════════╝ ║║║║
-║║║║╔═S7ParameterWriteVarRequest═════════════════════════════════════════════════════════════════════════╗║║║║
-║║║║║╔═numItems╗ ║║║║║
-║║║║║║ 0x01 1 ║ ║║║║║
-║║║║║╚═════════╝ ║║║║║
-║║║║║╔═items/S7VarRequestParameterItem══════════════════════════════════════════════════════════════════╗║║║║║
-║║║║║║╔═itemType╗ ║║║║║║
-║║║║║║║ 0x12 18 ║ ║║║║║║
-║║║║║║╚═════════╝ ║║║║║║
-║║║║║║╔═S7VarRequestParameterItemAddress═══════════════════════════════════════════════════════════════╗║║║║║║
-║║║║║║║╔═itemLength╗ ║║║║║║║
-║║║║║║║║ 0x0a 10 ║ ║║║║║║║
-║║║║║║║╚═══════════╝ ║║║║║║║
-║║║║║║║╔═address/S7Address════════════════════════════════════════════════════════════════════════════╗║║║║║║║
-║║║║║║║║╔═addressType╗ ║║║║║║║║
-║║║║║║║║║ 0x10 16 ║ ║║║║║║║║
-║║║║║║║║╚════════════╝ ║║║║║║║║
-║║║║║║║║╔═S7AddressAny═══════════════════════════════════════════════════════════════════════════════╗║║║║║║║║
-║║║║║║║║║╔═transportSize/TransportSize═══╗╔═numberOfElements╗╔═dbNumber╗╔═area/MemoryArea╗╔═reserved╗║║║║║║║║║
-║║║║║║║║║║ 0x02 2 BYTE ║║ 0x0040 64 ║║0x000d 13║║0x81 129 INPUTS ║║ 0x0 0 ║║║║║║║║║║
-║║║║║║║║║╚═══════════════════════════════╝╚═════════════════╝╚═════════╝╚════════════════╝╚═════════╝║║║║║║║║║
-║║║║║║║║║╔═byteAddress╗╔═bitAddress╗ ║║║║║║║║║
-║║║║║║║║║║ 0x0000 0 ║║ 0x0 0 ║ ║║║║║║║║║
-║║║║║║║║║╚════════════╝╚═══════════╝ ║║║║║║║║║
-║║║║║║║║╚════════════════════════════════════════════════════════════════════════════════════════════╝║║║║║║║║
-║║║║║║║╚══════════════════════════════════════════════════════════════════════════════════════════════╝║║║║║║║
-║║║║║║╚════════════════════════════════════════════════════════════════════════════════════════════════╝║║║║║║
-║║║║║╚══════════════════════════════════════════════════════════════════════════════════════════════════╝║║║║║
-║║║║╚════════════════════════════════════════════════════════════════════════════════════════════════════╝║║║║
-║║║╚══════════════════════════════════════════════════════════════════════════════════════════════════════╝║║║
-║║║╔═payload/S7Payload/S7PayloadWriteVarRequest/items/S7VarPayloadDataItem═════════════════════════╗ ║║║
-║║║║╔═returnCode/DataTransportErrorCode════════════╗╔═transportSize/DataTransportSize╗╔═dataLength╗║ ║║║
-║║║║║ 0xff 255 OK ║║ 0x04 4 BYTE_WORD_DWORD ║║0x0200 512 ║║ ║║║
-║║║║╚══════════════════════════════════════════════╝╚════════════════════════════════╝╚═══════════╝║ ║║║
-║║║║╔═data════════════════════════════════════════╗ ║ ║║║
-║║║║║00|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
-║║║║║10|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
-║║║║║20|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
-║║║║║30|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
-║║║║║40|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
-║║║║║50|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
-║║║║║60|af fe af fe '.... '║ ║ ║║║
-║║║║╚═════════════════════════════════════════════╝ ║ ║║║
-║║║╚═══════════════════════════════════════════════════════════════════════════════════════════════╝ ║║║
-║║╚════════════════════════════════════════════════════════════════════════════════════════════════════════╝║║
-║╚══════════════════════════════════════════════════════════════════════════════════════════════════════════╝║
-╚════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
-`,
+╔═TPKTPacket══════════════════════════════════════════════════════════════════════════════════════════════╗
+║╔═protocolId╗╔═reserved╗╔═len══════╗ ║
+║║ 0x03 3 ║║ 0x00 0 ║║0x0066 102║ ║
+║╚═══════════╝╚═════════╝╚══════════╝ ║
+║╔═payload/COTPPacket════════════════════════════════════════════════════════════════════════════════════╗║
+║║╔═headerLength╗╔═tpduCode╗╔═COTPPacketData═════╗ ║║
+║║║ 0x05 5 ║║0xf0 240 ║║╔═eot════╗╔═tpduRef╗║ ║║
+║║╚═════════════╝╚═════════╝║║b0 false║║ 0xd 13 ║║ ║║
+║║ ║╚════════╝╚════════╝║ ║║
+║║ ╚════════════════════╝ ║║
+║║╔═parameters/COTPParameter═══════════════════════════════════════════════════════╗ ║║
+║║║╔═parameterType╗╔═parameterLength╗╔═COTPParameterTpduSize/tpduSize/COTPTpduSize╗║ ║║
+║║║║ 0xc0 192 ║║ 0x01 1 ║║ 0x0c 12 SIZE_4096 ║║ ║║
+║║║╚══════════════╝╚════════════════╝╚════════════════════════════════════════════╝║ ║║
+║║╚════════════════════════════════════════════════════════════════════════════════╝ ║║
+║║╔═payload/S7Message═══════════════════════════════════════════════════════════════════════════════════╗║║
+║║║╔═protocolId╗╔═messageType╗╔═reserved╗╔═tpduReference╗╔═parameterLength╗╔═payloadLength╗ ║║║
+║║║║ 0x32 50 ║║ 0x01 1 ║║0x0000 0 ║║ 0x000d 13 ║║ 0x000e 14 ║║ 0x0044 68 ║ ║║║
+║║║╚═══════════╝╚════════════╝╚═════════╝╚══════════════╝╚════════════════╝╚══════════════╝ ║║║
+║║║╔═parameter/S7Parameter═════════════════════════════════════════════════════════════════════════════╗║║║
+║║║║╔═parameterType╗ ║║║║
+║║║║║ 0x05 5 ║ ║║║║
+║║║║╚══════════════╝ ║║║║
+║║║║╔═S7ParameterWriteVarRequest══════════════════════════════════════════════════════════════════════╗║║║║
+║║║║║╔═numItems╗ ║║║║║
+║║║║║║ 0x01 1 ║ ║║║║║
+║║║║║╚═════════╝ ║║║║║
+║║║║║╔═items/S7VarRequestParameterItem═══════════════════════════════════════════════════════════════╗║║║║║
+║║║║║║╔═itemType╗ ║║║║║║
+║║║║║║║ 0x12 18 ║ ║║║║║║
+║║║║║║╚═════════╝ ║║║║║║
+║║║║║║╔═S7VarRequestParameterItemAddress════════════════════════════════════════════════════════════╗║║║║║║
+║║║║║║║╔═itemLength╗ ║║║║║║║
+║║║║║║║║ 0x0a 10 ║ ║║║║║║║
+║║║║║║║╚═══════════╝ ║║║║║║║
+║║║║║║║╔═address/S7Address═════════════════════════════════════════════════════════════════════════╗║║║║║║║
+║║║║║║║║╔═addressType╗ ║║║║║║║║
+║║║║║║║║║ 0x10 16 ║ ║║║║║║║║
+║║║║║║║║╚════════════╝ ║║║║║║║║
+║║║║║║║║╔═S7AddressAny════════════════════════════════════════════════════════════════════════════╗║║║║║║║║
+║║║║║║║║║╔═transportSize/TransportSize╗╔═numberOfElements╗╔═dbNumber╗╔═area/MemoryArea╗╔═reserved╗║║║║║║║║║
+║║║║║║║║║║ 0x02 2 BYTE ║║ 0x0040 64 ║║0x000d 13║║0x81 129 INPUTS ║║ 0x0 0 ║║║║║║║║║║
+║║║║║║║║║╚════════════════════════════╝╚═════════════════╝╚═════════╝╚════════════════╝╚═════════╝║║║║║║║║║
+║║║║║║║║║╔═byteAddress╗╔═bitAddress╗ ║║║║║║║║║
+║║║║║║║║║║ 0x0000 0 ║║ 0x0 0 ║ ║║║║║║║║║
+║║║║║║║║║╚════════════╝╚═══════════╝ ║║║║║║║║║
+║║║║║║║║╚═════════════════════════════════════════════════════════════════════════════════════════╝║║║║║║║║
+║║║║║║║╚═══════════════════════════════════════════════════════════════════════════════════════════╝║║║║║║║
+║║║║║║╚═════════════════════════════════════════════════════════════════════════════════════════════╝║║║║║║
+║║║║║╚═══════════════════════════════════════════════════════════════════════════════════════════════╝║║║║║
+║║║║╚═════════════════════════════════════════════════════════════════════════════════════════════════╝║║║║
+║║║╚═══════════════════════════════════════════════════════════════════════════════════════════════════╝║║║
+║║║╔═payload/S7Payload/S7PayloadWriteVarRequest/items/S7VarPayloadDataItem═════════════╗ ║║║
+║║║║╔═returnCode/DataTransportErrorCode╗╔═transportSize/DataTransportSize╗╔═dataLength╗║ ║║║
+║║║║║ 0xff 255 OK ║║ 0x04 4 BYTE_WORD_DWORD ║║0x0200 512 ║║ ║║║
+║║║║╚══════════════════════════════════╝╚════════════════════════════════╝╚═══════════╝║ ║║║
+║║║║╔═data════════════════════════════════════════╗ ║ ║║║
+║║║║║00|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
+║║║║║10|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
+║║║║║20|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
+║║║║║30|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
+║║║║║40|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
+║║║║║50|af fe af fe af fe af fe af fe '..........'║ ║ ║║║
+║║║║║60|af fe af fe '.... '║ ║ ║║║
+║║║║╚═════════════════════════════════════════════╝ ║ ║║║
+║║║╚═══════════════════════════════════════════════════════════════════════════════════╝ ║║║
+║║╚═════════════════════════════════════════════════════════════════════════════════════════════════════╝║║
+║╚═══════════════════════════════════════════════════════════════════════════════════════════════════════╝║
+╚═════════════════════════════════════════════════════════════════════════════════════════════════════════╝`,
wantStringXml: `
<TPKTPacket>
<protocolId dataType="uint" bitLength="8">3</protocolId>
@@ -882,7 +879,7 @@ func TestS7MessageBytes(t *testing.T) {
}
})
t.Run("Simple 2 Compact Box", func(t *testing.T) {
- boxWriter := utils.NewWriteBufferBoxBasedWithOptions(true, true)
+ boxWriter := utils.NewWriteBufferBoxBased(utils.WithWriteBufferBoxBasedMergeSingleBoxes(), utils.WithWriteBufferBoxBasedOmitEmptyBoxes())
if err := tt.args.debuggable.SerializeWithWriteBuffer(context.Background(), boxWriter); err != nil {
t.Error(err)
}
diff --git a/plc4go/spi/transactions/completedFuture_test.go b/plc4go/spi/transactions/completedFuture_test.go
index 76840a6a68..af00f07d5e 100644
--- a/plc4go/spi/transactions/completedFuture_test.go
+++ b/plc4go/spi/transactions/completedFuture_test.go
@@ -102,9 +102,9 @@ func Test_completedFuture_String(t *testing.T) {
err: errors.New("asd"),
},
want: `
-╔═completedFuture/err═╗
-║ asd ║
-╚═════════════════════╝`[1:],
+╔═completedFuture/err╗
+║ asd ║
+╚════════════════════╝`[1:],
},
}
for _, tt := range tests {