move code to src/test

* so that it compiles and tests pass
* fix some additional snip references in getting started
This commit is contained in:
Patrik Nordwall 2017-05-11 15:11:25 +02:00
parent 413df8e0f4
commit 59f53e1a22
289 changed files with 45 additions and 45 deletions

View file

@ -0,0 +1,35 @@
/**
* Copyright (C) 2015-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package docs.stream
import akka.stream.scaladsl._
import akka.testkit.AkkaSpec
class MigrationsScala extends AkkaSpec {
"Examples in migration guide" must {
"compile" in {
lazy val dontExecuteMe = {
//#expand-continually
Flow[Int].expand(Iterator.continually(_))
//#expand-continually
//#expand-state
Flow[Int].expand(i => {
var state = 0
Iterator.continually({
state += 1
(i, state)
})
})
//#expand-state
//#async
val flow = Flow[Int].map(_ + 1)
Source(1 to 10).via(flow.async)
//#async
}
}
}
}