diff options
-rw-r--r-- | test/files/jvm/serialization.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/jvm/serialization.scala b/test/files/jvm/serialization.scala index 34b64938b4..f2c47aad77 100644 --- a/test/files/jvm/serialization.scala +++ b/test/files/jvm/serialization.scala @@ -604,6 +604,7 @@ object Test { Test7 Test8 Test9_parallel + Test10_util } } @@ -669,3 +670,17 @@ object Test9_parallel { throw e } } + +//############################################################################ +// Test classes in package scala.util + +object Test10_util { + import scala.util.Random + def rep[A](n: Int)(f: => A) { if (n > 0) { f; rep(n-1)(f) } } + + try { + val random = new Random(345) + val random2: Random = read(write(random)) + rep(5) { assert(random.nextInt == random2.nextInt) } + } +} |