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/08/31 22:41:15 UTC

(plc4x) 02/03: test(plc4go/spi): Ignore empty list elements insertions

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 e2715a3d8cc5719e365adb3d1ddbc39e662e8519
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Sun Sep 1 00:27:39 2024 +0200

    test(plc4go/spi): Ignore empty list elements insertions
---
 plc4go/spi/testutils/TestUtils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4go/spi/testutils/TestUtils.go b/plc4go/spi/testutils/TestUtils.go
index 6225349229..a2e68fdd41 100644
--- a/plc4go/spi/testutils/TestUtils.go
+++ b/plc4go/spi/testutils/TestUtils.go
@@ -70,7 +70,7 @@ func CompareResults(t *testing.T, actualString []byte, referenceString []byte) e
 	}
 	cleanDiff := make([]xdiff.Delta, 0)
 	for _, delta := range diff {
-		if delta.Operation == xdiff.Delete && delta.Subject.Value == nil || delta.Operation == xdiff.Insert && delta.Subject.Value == nil {
+		if delta.Operation == xdiff.Delete && delta.Subject.Value == nil || delta.Operation == xdiff.Insert && delta.Subject.Value == nil || delta.Operation == xdiff.InsertSubtree && delta.Subject.Value == nil {
 			localLog.Info().Interface("delta", delta).Msg("We ignore empty elements which should be deleted")
 			continue
 		}