blob: 03d8815ab2670f30b5dc8484effc0e11f0a72b7d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package scala.tools
package testing
import org.junit.Assert._
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import AssertUtil._
import java.lang.ref._
@RunWith(classOf[JUnit4])
class AssertUtilTest {
@Test def reachableIgnoresReferences(): Unit = {
class Holder[A](val ref: SoftReference[A])
val o = new Object
val r = new SoftReference(o)
assertNotReachable(o, new Holder(r)) { }
}
}
|