Skip to content

Commit

Permalink
Use JUnit's assertSame in scala.xml.ReuseNodesTest
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawley committed Oct 17, 2016
1 parent 704a545 commit 713d2d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/scala/scala/xml/ReuseNodesTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,7 +73,7 @@ class ReuseNodesTest {
def transformReferentialEquality(rt:RuleTransformer) = {
val original = <p><lost/></p>
val tranformed = rt.transform(original)
assertTrue(original eq tranformed)
assertSame(original, tranformed)
}

@Theory
Expand All @@ -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
}
Expand Down

0 comments on commit 713d2d9

Please sign in to comment.