@@ -21,7 +21,7 @@ import org.scalatest.matchers.should.Matchers
21
21
*/
22
22
final class taskSpec extends AsyncFreeSpec with Matchers {
23
23
24
- " tailRecurision" in Task .toFuture(* [ Task ] {
24
+ " tailRecurision" in Task .toFuture(Task {
25
25
def loop (i : Int = 0 , accumulator : Int = 0 ): task.Task [Int ] = * [task.Task ] {
26
26
if (i < 10000 ) {
27
27
! Shift (loop(i + 1 , accumulator + i))
@@ -34,11 +34,11 @@ final class taskSpec extends AsyncFreeSpec with Matchers {
34
34
result should be(49995000 )
35
35
})
36
36
37
- " taskToFuture" in Task .toFuture(* [ Task ] {
37
+ " taskToFuture" in Task .toFuture(Task {
38
38
succeed
39
39
})
40
40
41
- " loop" in Task .toFuture(* [ Task ] {
41
+ " loop" in Task .toFuture(Task {
42
42
43
43
val task1 : Task [Int ] = Task .now(1 )
44
44
@@ -58,13 +58,13 @@ final class taskSpec extends AsyncFreeSpec with Matchers {
58
58
a[MyException ] should be thrownBy task1
59
59
}
60
60
61
- " try" in Task .toFuture(* [ Task ] {
61
+ " try" in Task .toFuture(Task {
62
62
class MyException extends Exception
63
- def task1 : Task [Int ] = * [ Task ] {
63
+ val task1 : Task [Int ] = Task {
64
64
throw new MyException
65
65
}
66
66
67
- val task2 = * [ Task ] {
67
+ val task2 = Task {
68
68
val v =
69
69
try {
70
70
! Shift (task1)
@@ -90,7 +90,7 @@ final class taskSpec extends AsyncFreeSpec with Matchers {
90
90
throw new MyException
91
91
}
92
92
93
- val task2 : Task [String ] = * [ Task ] {
93
+ val task2 : Task [String ] = Task {
94
94
try {
95
95
" no exception"
96
96
} catch {
@@ -114,6 +114,7 @@ final class taskSpec extends AsyncFreeSpec with Matchers {
114
114
" autoClose" in {
115
115
val logs = ArrayBuffer .empty[Int ]
116
116
117
+ // TODO: Re-implement Using to support `Task {}` instead of `*[Task]`
117
118
val task : Task [Unit ] = * [Task ] {
118
119
119
120
logs += 0
@@ -137,6 +138,7 @@ final class taskSpec extends AsyncFreeSpec with Matchers {
137
138
}
138
139
})
139
140
141
+ // TODO: Re-implement Using to support `Task{}`
140
142
! Shift (* [Task ] {
141
143
logs += 3
142
144
0 commit comments