aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/scala/async/run/toughtype/ToughType.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/scala/async/run/toughtype/ToughType.scala')
-rw-r--r--src/test/scala/scala/async/run/toughtype/ToughType.scala40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/test/scala/scala/async/run/toughtype/ToughType.scala b/src/test/scala/scala/async/run/toughtype/ToughType.scala
index ab0b60d..83f5a2d 100644
--- a/src/test/scala/scala/async/run/toughtype/ToughType.scala
+++ b/src/test/scala/scala/async/run/toughtype/ToughType.scala
@@ -37,28 +37,26 @@ class ToughTypeSpec {
res._1 mustBe (Nil)
}
-// TODO 2.10.1
-// @Test def patternMatchingPartialFunction() {
-// import AsyncId.{await, async}
-// async {
-// await(1)
-// val a = await(1)
-// val f = { case x => x + a }: PartialFunction[Int, Int]
-// await(f(2))
-// } mustBe 3
-// }
+ @Test def patternMatchingPartialFunction() {
+ import AsyncId.{await, async}
+ async {
+ await(1)
+ val a = await(1)
+ val f = { case x => x + a }: PartialFunction[Int, Int]
+ await(f(2))
+ } mustBe 3
+ }
-// TODO 2.10.1
-// @Test def patternMatchingPartialFunctionNested() {
-// import AsyncId.{await, async}
-// async {
-// await(1)
-// val neg1 = -1
-// val a = await(1)
-// val f = { case x => ({case x => neg1 * x}: PartialFunction[Int, Int])(x + a) }: PartialFunction[Int, Int]
-// await(f(2))
-// } mustBe -3
-// }
+ @Test def patternMatchingPartialFunctionNested() {
+ import AsyncId.{await, async}
+ async {
+ await(1)
+ val neg1 = -1
+ val a = await(1)
+ val f = { case x => ({case x => neg1 * x}: PartialFunction[Int, Int])(x + a) }: PartialFunction[Int, Int]
+ await(f(2))
+ } mustBe -3
+ }
@Test def patternMatchingFunction() {
import AsyncId.{await, async}