You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2021/02/07 17:15:13 UTC
[freemarker] 04/04: Fixed "assertEquals" directive (used in JUnit
tests)
This is an automated email from the ASF dual-hosted git repository.
ddekany pushed a commit to branch 3
in repository https://gitbox.apache.org/repos/asf/freemarker.git
commit f96be9a0ed0e834694a5ae6a2b76144e2fcce99b
Author: ddekany <dd...@apache.org>
AuthorDate: Sun Feb 7 18:13:27 2021 +0100
Fixed "assertEquals" directive (used in JUnit tests)
---
.../org/apache/freemarker/test/templateutil/AssertEqualsDirective.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/templateutil/AssertEqualsDirective.java b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/templateutil/AssertEqualsDirective.java
index 27c1ba2..a5fd6ed 100644
--- a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/templateutil/AssertEqualsDirective.java
+++ b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/templateutil/AssertEqualsDirective.java
@@ -57,7 +57,7 @@ public class AssertEqualsDirective implements TemplateDirectiveModel {
public void execute(TemplateModel[] args, CallPlace callPlace, Writer out, Environment env)
throws TemplateException, IOException {
TemplateModel actual = CallableUtils.getArgument(args, ACTUAL_ARG_IDX, null, this);
- TemplateModel expected = CallableUtils.getArgument(args, ACTUAL_ARG_IDX, null, this);
+ TemplateModel expected = CallableUtils.getArgument(args, EXPECTED_ARG_IDX, null, this);
if (!env.applyEqualsOperatorLenient(actual, expected)) {
throw new AssertionFailedInTemplateException("Assertion failed:\n"
+ "Expected: " + tryUnwrap(expected) + "\n"