Repository: logging-log4j2 Updated Branches: refs/heads/master b28ff4fae -> c5155511d
Better assert message. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d1684046 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d1684046 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d1684046 Branch: refs/heads/master Commit: d1684046dca12397eacee660fc6c3cc15b266186 Parents: b28ff4f Author: Gary Gregory <[email protected]> Authored: Mon Nov 17 22:13:12 2014 -0500 Committer: Gary Gregory <[email protected]> Committed: Mon Nov 17 22:13:12 2014 -0500 ---------------------------------------------------------------------- .../test/java/org/apache/logging/slf4j/MarkerTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d1684046/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/MarkerTest.java ---------------------------------------------------------------------- diff --git a/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/MarkerTest.java b/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/MarkerTest.java index a325dd6..1460b87 100644 --- a/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/MarkerTest.java +++ b/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/MarkerTest.java @@ -34,7 +34,7 @@ public class MarkerTest { public void clearMarkers() { MarkerManager.clear(); } - + @Test public void testMarker() { final org.slf4j.Marker slf4jMarker = org.slf4j.MarkerFactory.getMarker("TEST"); @@ -44,9 +44,10 @@ public class MarkerTest { final Marker log4jMarker = MarkerManager.getMarker("TEST"); assertTrue("Incorrect Marker class", slf4jMarker instanceof Log4jMarker); - assertTrue("TEST is not an instance of PARENT in Log4j", log4jMarker.isInstanceOf(log4jParent)); - assertTrue("TEST is not an instance of PARENT in SLF4J", slf4jMarker.contains(slf4jParent)); + assertTrue(String.format("TEST (log4jMarker=%s) is not an instance of PARENT (log4jParent=%s) in Log4j", + log4jMarker, log4jParent), log4jMarker.isInstanceOf(log4jParent)); + assertTrue(String.format("TEST (slf4jMarker=%s) is not an instance of PARENT (log4jParent=%s) in SLF4J", + slf4jMarker, slf4jParent), slf4jMarker.contains(slf4jParent)); } - - + }
