format source with scalafmt

This commit is contained in:
Auto Format 2019-03-11 10:38:24 +01:00 committed by Patrik Nordwall
parent 0f40491d42
commit ce404e4f53
1669 changed files with 43208 additions and 35404 deletions

View file

@ -43,10 +43,9 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(OnComplete))
}
"implement chain of maps correctly" in new OneBoundedSetup[Int](
Map((x: Int) => x + 1),
Map((x: Int) => x * 2),
Map((x: Int) => x + 1)) {
"implement chain of maps correctly" in new OneBoundedSetup[Int](Map((x: Int) => x + 1),
Map((x: Int) => x * 2),
Map((x: Int) => x + 1)) {
lastEvents() should be(Set.empty)
@ -79,9 +78,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(OnComplete))
}
"implement one-to-many many-to-one chain correctly" in new OneBoundedSetup[Int](
Doubler(),
Filter((x: Int) => x != 0)) {
"implement one-to-many many-to-one chain correctly" in new OneBoundedSetup[Int](Doubler(),
Filter((x: Int) => x != 0)) {
lastEvents() should be(Set.empty)
@ -104,9 +102,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(OnComplete))
}
"implement many-to-one one-to-many chain correctly" in new OneBoundedSetup[Int](
Filter((x: Int) => x != 0),
Doubler()) {
"implement many-to-one one-to-many chain correctly" in new OneBoundedSetup[Int](Filter((x: Int) => x != 0),
Doubler()) {
lastEvents() should be(Set.empty)
@ -146,10 +143,9 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(OnNext(1), Cancel, OnComplete))
}
"implement take inside a chain" in new OneBoundedSetup[Int](
Filter((x: Int) => x != 0),
takeTwo,
Map((x: Int) => x + 1)) {
"implement take inside a chain" in new OneBoundedSetup[Int](Filter((x: Int) => x != 0),
takeTwo,
Map((x: Int) => x + 1)) {
lastEvents() should be(Set.empty)
@ -208,7 +204,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(Cancel))
}
"work if fold completes while not in a push position" in new OneBoundedSetup[Int](Fold(0, (agg: Int, x: Int) => agg + x)) {
"work if fold completes while not in a push position" in new OneBoundedSetup[Int](
Fold(0, (agg: Int, x: Int) => agg + x)) {
lastEvents() should be(Set.empty)
@ -244,11 +241,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(OnNext(Vector(3)), OnComplete))
}
"implement batch (conflate)" in new OneBoundedSetup[Int](Batch(
1L,
ConstantFun.zeroLong,
(in: Int) => in,
(agg: Int, x: Int) => agg + x)) {
"implement batch (conflate)" in new OneBoundedSetup[Int](
Batch(1L, ConstantFun.zeroLong, (in: Int) => in, (agg: Int, x: Int) => agg + x)) {
lastEvents() should be(Set(RequestOne))
@ -304,16 +298,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
}
"work with batch-batch (conflate-conflate)" in new OneBoundedSetup[Int](
Batch(
1L,
ConstantFun.zeroLong,
(in: Int) => in,
(agg: Int, x: Int) => agg + x),
Batch(
1L,
ConstantFun.zeroLong,
(in: Int) => in,
(agg: Int, x: Int) => agg + x)) {
Batch(1L, ConstantFun.zeroLong, (in: Int) => in, (agg: Int, x: Int) => agg + x),
Batch(1L, ConstantFun.zeroLong, (in: Int) => in, (agg: Int, x: Int) => agg + x)) {
lastEvents() should be(Set(RequestOne))
@ -343,9 +329,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
}
"work with expand-expand" in new OneBoundedSetup[Int](
new Expand((x: Int) => Iterator.from(x)),
new Expand((x: Int) => Iterator.from(x))) {
"work with expand-expand" in new OneBoundedSetup[Int](new Expand((x: Int) => Iterator.from(x)),
new Expand((x: Int) => Iterator.from(x))) {
lastEvents() should be(Set(RequestOne))
@ -377,11 +362,7 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
}
"implement batch-expand (conflate-expand)" in new OneBoundedSetup[Int](
Batch(
1L,
ConstantFun.zeroLong,
(in: Int) => in,
(agg: Int, x: Int) => agg + x),
Batch(1L, ConstantFun.zeroLong, (in: Int) => in, (agg: Int, x: Int) => agg + x),
new Expand(Iterator.continually(_: Int))) {
lastEvents() should be(Set(RequestOne))
@ -413,11 +394,7 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
"implement doubler-conflate (doubler-batch)" in new OneBoundedSetup[Int](
Doubler(),
Batch(
1L,
ConstantFun.zeroLong,
(in: Int) => in,
(agg: Int, x: Int) => agg + x)) {
Batch(1L, ConstantFun.zeroLong, (in: Int) => in, (agg: Int, x: Int) => agg + x)) {
lastEvents() should be(Set(RequestOne))
upstream.onNext(1)
@ -432,12 +409,11 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
}
// Note, the new interpreter has no jumpback table, still did not want to remove the test
"work with jumpback table and completed elements" in new OneBoundedSetup[Int](
Map((x: Int) => x),
Map((x: Int) => x),
KeepGoing(),
Map((x: Int) => x),
Map((x: Int) => x)) {
"work with jumpback table and completed elements" in new OneBoundedSetup[Int](Map((x: Int) => x),
Map((x: Int) => x),
KeepGoing(),
Map((x: Int) => x),
Map((x: Int) => x)) {
lastEvents() should be(Set.empty)
@ -489,9 +465,8 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
lastEvents() should be(Set(OnNext(1), OnComplete))
}
"work with pushAndFinish if upstream completes with pushAndFinish and downstream immediately pulls" in new OneBoundedSetup[Int](
new PushFinishStage,
Fold(0, (x: Int, y: Int) => x + y)) {
"work with pushAndFinish if upstream completes with pushAndFinish and downstream immediately pulls" in new OneBoundedSetup[
Int](new PushFinishStage, Fold(0, (x: Int, y: Int) => x + y)) {
lastEvents() should be(Set.empty)
@ -512,8 +487,7 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
setHandlers(in, out, this)
}
}
) {
}) {
lastEvents() should be(Set.empty)
downstream.requestOne()
@ -530,9 +504,7 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
} should be(true)
}
"implement take-take" in new OneBoundedSetup[Int](
takeOne,
takeOne) {
"implement take-take" in new OneBoundedSetup[Int](takeOne, takeOne) {
lastEvents() should be(Set.empty)
downstream.requestOne()
@ -543,9 +515,7 @@ class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
}
"implement take-take with pushAndFinish from upstream" in new OneBoundedSetup[Int](
takeOne,
takeOne) {
"implement take-take with pushAndFinish from upstream" in new OneBoundedSetup[Int](takeOne, takeOne) {
lastEvents() should be(Set.empty)
downstream.requestOne()