From f42d1b38fd9acf6c7fbee788aebdbcf3468e80eb Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Mon, 14 Sep 2015 15:27:54 -0400 Subject: [PATCH] Use JUnit's assertSame in scala.xml.ReuseNodesTest --- src/test/scala/scala/xml/ReuseNodesTest.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/scala/scala/xml/ReuseNodesTest.scala b/src/test/scala/scala/xml/ReuseNodesTest.scala index 636de592b..d3b05a338 100644 --- a/src/test/scala/scala/xml/ReuseNodesTest.scala +++ b/src/test/scala/scala/xml/ReuseNodesTest.scala @@ -4,6 +4,7 @@ import scala.xml.transform._ import org.junit.Test import org.junit.Assert.assertTrue import org.junit.Assert.assertEquals +import org.junit.Assert.assertSame import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.experimental.theories.DataPoints @@ -72,7 +73,7 @@ class ReuseNodesTest { def transformReferentialEquality(rt:RuleTransformer) = { val original =

val tranformed = rt.transform(original) - assertTrue(original eq tranformed) + assertSame(original, tranformed) } @Theory @@ -93,7 +94,7 @@ class ReuseNodesTest { case "changed" => // do nothing expect this node to be changed recursiveAssert(original.child,transformed.child) case _ => { - assertTrue(original eq transformed) + assertSame(original, transformed) // No need to check for children, node being immuatable // children can't be different if parents are referentially equal }