Skip to content

Commit

Permalink
Move { up to same line as whenExecuting(random) in RandomSamplerSuite…
Browse files Browse the repository at this point in the history
….scala
  • Loading branch information
holdenk committed Apr 9, 2014
1 parent c5b723f commit e187e35
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class RandomSamplerSuite extends FunSuite with BeforeAndAfter with EasyMockSugar
random.nextDouble().andReturn(x)
}
}
whenExecuting(random)
{
whenExecuting(random) {
val sampler = new BernoulliSampler[Int](0.25, 0.55)(random)
assert(sampler.sample(a.iterator).toList == List(3, 4, 5))
}
Expand All @@ -54,8 +53,7 @@ class RandomSamplerSuite extends FunSuite with BeforeAndAfter with EasyMockSugar
random.nextDouble().andReturn(x)
}
}
whenExecuting(random)
{
whenExecuting(random) {
val sampler = new BernoulliSampler[Int](0.25, 0.55, true)(random)
assert(sampler.sample(a.iterator).toList === List(1, 2, 6, 7, 8, 9))
}
Expand All @@ -67,8 +65,7 @@ class RandomSamplerSuite extends FunSuite with BeforeAndAfter with EasyMockSugar
random.nextDouble().andReturn(x)
}
}
whenExecuting(random)
{
whenExecuting(random) {
val sampler = new BernoulliSampler[Int](0.35)(random)
assert(sampler.sample(a.iterator).toList == List(1, 2, 3))
}
Expand All @@ -80,8 +77,7 @@ class RandomSamplerSuite extends FunSuite with BeforeAndAfter with EasyMockSugar
random.nextDouble().andReturn(x)
}
}
whenExecuting(random)
{
whenExecuting(random) {
val sampler = new BernoulliSampler[Int](0.25, 0.55, true)(random)
assert(sampler.sample(a.iterator).toList == List(1, 2, 6, 7, 8, 9))
}
Expand All @@ -91,8 +87,7 @@ class RandomSamplerSuite extends FunSuite with BeforeAndAfter with EasyMockSugar
expecting {
random.setSeed(10L)
}
whenExecuting(random)
{
whenExecuting(random) {
val sampler = new BernoulliSampler[Int](0.2)(random)
sampler.setSeed(10L)
}
Expand Down

0 comments on commit e187e35

Please sign in to comment.