Skip to content

Commit 1dd3982

Browse files
committed
[bugfix] Fix order of arguments when performing an XML Diff
1 parent 99e557b commit 1dd3982

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

exist-core/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,7 @@
12431243
<include>src/test/resources-filtered/org/exist/xquery/functions/transform/transform-from-pkg-test.conf.xml</include>
12441244
<include>src/main/java/org/exist/xquery/functions/transform/Transform.java</include>
12451245
<include>src/test/java/org/exist/xquery/functions/transform/TransformFromPkgTest.java</include>
1246+
<include>src/test/java/org/exist/xquery/functions/transform/TransformTest.java</include>
12461247
<include>src/main/java/org/exist/xquery/functions/util/BuiltinFunctions.java</include>
12471248
<include>src/main/java/org/exist/xquery/functions/util/DescribeFunction.java</include>
12481249
<include>src/main/java/org/exist/xquery/functions/util/FunctionFunction.java</include>
@@ -1905,6 +1906,7 @@
19051906
<exclude>src/test/resources-filtered/org/exist/xquery/functions/transform/transform-from-pkg-test.conf.xml</exclude>
19061907
<exclude>src/main/java/org/exist/xquery/functions/transform/Transform.java</exclude>
19071908
<exclude>src/test/java/org/exist/xquery/functions/transform/TransformFromPkgTest.java</exclude>
1909+
<exclude>src/test/java/org/exist/xquery/functions/transform/TransformTest.java</exclude>
19081910
<exclude>src/main/java/org/exist/xquery/functions/util/BuiltinFunctions.java</exclude>
19091911
<exclude>src/main/java/org/exist/xquery/functions/util/DescribeFunction.java</exclude>
19101912
<exclude>src/main/java/org/exist/xquery/functions/util/Eval.java</exclude>

exist-core/src/test/java/org/exist/dom/persistent/PersistentDomTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ private void assertXml(final String expected, final Node actual) {
430430
final Source srcExpected = Input.fromString(expected).build();
431431
final Source srcActual = Input.fromNode(actual).build();
432432

433-
final Diff diff = DiffBuilder.compare(srcActual)
434-
.withTest(srcExpected)
433+
final Diff diff = DiffBuilder.compare(srcExpected)
434+
.withTest(srcActual)
435435
.checkForIdentical()
436436
.build();
437437

exist-core/src/test/java/org/exist/xquery/functions/transform/TransformTest.java

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
/*
2+
* Elemental
3+
* Copyright (C) 2024, Evolved Binary Ltd
4+
*
5+
6+
* https://www.evolvedbinary.com | https://www.elemental.xyz
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; version 2.1.
11+
*
12+
* This library is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with this library; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*
21+
* NOTE: Parts of this file contain code from 'The eXist-db Authors'.
22+
* The original license header is included below.
23+
*
24+
* =====================================================================
25+
*
226
* eXist-db Open Source Native XML Database
327
* Copyright (C) 2001 The eXist-db Authors
428
*
@@ -253,8 +277,8 @@ public void xslDocument() throws EXistException, PermissionDeniedException, XPat
253277
final Source expected = Input.fromString("<elem1/>").build();
254278
final Source actual = Input.fromDocument(sequence.itemAt(0).toJavaObject(Document.class)).build();
255279

256-
final Diff diff = DiffBuilder.compare(actual)
257-
.withTest(expected)
280+
final Diff diff = DiffBuilder.compare(expected)
281+
.withTest(actual)
258282
.checkForSimilar()
259283
.build();
260284

0 commit comments

Comments
 (0)