Adapt knit for new folder layout
diff --git a/coroutines-guide.md b/coroutines-guide.md
index 59f4b7d..dece725 100644
--- a/coroutines-guide.md
+++ b/coroutines-guide.md
@@ -20,8 +20,8 @@
import kotlinx.coroutines.experimental.*
-->
-<!--- KNIT core/kotlinx-coroutines-core/src/test/kotlin/guide/.*\.kt -->
-<!--- TEST_OUT core/kotlinx-coroutines-core/src/test/kotlin/guide/test/GuideTest.kt
+<!--- KNIT core/kotlinx-coroutines-core/test/guide/.*\.kt -->
+<!--- TEST_OUT core/kotlinx-coroutines-core/test/guide/test/GuideTest.kt
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.test
@@ -127,7 +127,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-01.kt)
Run this code:
@@ -171,7 +171,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-02.kt)
<!--- TEST
Hello,
@@ -195,7 +195,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-02b.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-02b.kt)
<!--- TEST
Hello,
@@ -234,7 +234,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-03.kt)
<!--- TEST
Hello,
@@ -266,7 +266,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-04.kt)
<!--- TEST
Hello,
@@ -289,7 +289,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-05.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-05.kt)
<!--- TEST lines.size == 1 && lines[0] == ".".repeat(100_000) -->
@@ -313,7 +313,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-06.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-basic-06.kt)
You can run and see that it prints three lines and terminates:
@@ -353,7 +353,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-01.kt)
It produces the following output:
@@ -400,7 +400,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-02.kt)
Run it to see that it continues to print "I'm sleeping" even after cancellation
until the job completes by itself after five iterations.
@@ -444,7 +444,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-03.kt)
As you can see, now this loop is cancelled. [isActive][CoroutineScope.isActive] is a property that is available inside
the code of coroutines via [CoroutineScope] object.
@@ -482,7 +482,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-04.kt)
Both [join][Job.join] and [cancelAndJoin] wait for all the finalization actions to complete,
so the example above produces the following output:
@@ -530,7 +530,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-05.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-05.kt)
<!--- TEST
I'm sleeping 0 ...
@@ -561,7 +561,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-06.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-06.kt)
It produces the following output:
@@ -597,7 +597,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-07.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-cancel-07.kt)
There is no longer an exception when running this code:
@@ -658,7 +658,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-compose-01.kt)
It produces something like this:
@@ -691,7 +691,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-compose-02.kt)
It produces something like this:
@@ -723,7 +723,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-compose-03.kt)
It produces something like this:
@@ -780,7 +780,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-compose-04.kt)
<!--- TEST ARBITRARY_TIME
The answer is 42
@@ -831,7 +831,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-01.kt)
It produces the following output (maybe in different order):
@@ -891,7 +891,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-02.kt)
Produces the output:
@@ -939,7 +939,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-03.kt)
There are three coroutines. The main coroutine (#1) -- `runBlocking` one,
and two coroutines computing deferred values `a` (#2) and `b` (#3).
@@ -982,7 +982,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-04.kt)
It demonstrates several new techniques. One is using [runBlocking] with an explicitly specified context, and
the other one is using [withContext] function to change a context of a coroutine while still staying in the
@@ -1015,7 +1015,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-05.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-05.kt)
It produces something like that when running in [debug mode](#debugging-coroutines-and-threads):
@@ -1069,7 +1069,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-06.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-06.kt)
The output of this code is:
@@ -1111,7 +1111,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-07.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-07.kt)
The expected outcome of this code is:
@@ -1148,7 +1148,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-08.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-08.kt)
The result is going to be:
@@ -1192,7 +1192,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-09.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-09.kt)
The output it produces with `-Dkotlinx.coroutines.debug` JVM option is similar to:
@@ -1244,7 +1244,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-10.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-context-10.kt)
The output of this example is:
@@ -1292,7 +1292,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-01.kt)
The output of this code is:
@@ -1330,7 +1330,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-02.kt)
<!--- TEST
1
@@ -1363,7 +1363,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-03.kt)
<!--- TEST
1
@@ -1407,7 +1407,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-04.kt)
<!--- TEST
1
@@ -1478,7 +1478,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-05.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-05.kt)
The output of this code is:
@@ -1548,7 +1548,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-06.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-06.kt)
The output will be similar to the the following one, albeit the processor ids that receive
each specific integer may be different:
@@ -1605,7 +1605,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-07.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-07.kt)
The output is:
@@ -1651,7 +1651,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-08.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-08.kt)
It prints "sending" _five_ times using a buffered channel with capacity of _four_:
@@ -1705,7 +1705,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-10.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-10.kt)
It prints following lines:
@@ -1759,7 +1759,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-09.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-channel-09.kt)
The "ping" coroutine is started first, so it is the first one to receive the ball. Even though "ping"
coroutine immediately starts receiving the ball again after sending it back to the table, the ball gets
@@ -1838,7 +1838,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-01.kt)
<!--- TEST LINES_START
Completed 1000000 actions in
@@ -1864,7 +1864,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-01b.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-01b.kt)
<!--- TEST LINES_START
Completed 1000000 actions in
@@ -1887,7 +1887,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-02.kt)
<!--- TEST LINES_START
Completed 1000000 actions in
@@ -1916,7 +1916,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-03.kt)
<!--- TEST ARBITRARY_TIME
Completed 1000000 actions in xxx ms
@@ -1948,7 +1948,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-04.kt)
<!--- TEST ARBITRARY_TIME
Completed 1000000 actions in xxx ms
@@ -1976,7 +1976,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-05.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-05.kt)
<!--- TEST ARBITRARY_TIME
Completed 1000000 actions in xxx ms
@@ -2009,7 +2009,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-06.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-06.kt)
<!--- TEST ARBITRARY_TIME
Completed 1000000 actions in xxx ms
@@ -2075,7 +2075,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-07.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-sync-07.kt)
<!--- TEST ARBITRARY_TIME
Completed 1000000 actions in xxx ms
@@ -2162,7 +2162,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-01.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-select-01.kt)
The result of this code is:
@@ -2226,7 +2226,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-02.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-select-02.kt)
The result of this code is quite interesting, so we'll analyze it in mode detail:
@@ -2294,7 +2294,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-03.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-select-03.kt)
So let us see what happens:
@@ -2361,7 +2361,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-04.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-select-04.kt)
The output is:
@@ -2437,7 +2437,7 @@
}
```
-> You can get full code [here](core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-05.kt)
+> You can get full code [here](core/kotlinx-coroutines-core/test/guide/example-select-05.kt)
The result of this code: