Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Commit f392719

Browse files
committed
Revert "Run tests on the compiler thread to make them more stable."
Wrapping all tests in ask calls is ugly. This reverts commit 8cc9d71.
1 parent 1ac4073 commit f392719

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

org.scala-refactoring.library/src/test/scala/scala/tools/refactoring/tests/sourcegen/ReusingPrinterTest.scala

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
4444
}
4545

4646
@Test
47-
def add_return_type_to_def() = global.ask { () => """
47+
def add_return_type_to_def() = """
4848
package add_return_type_to_def
4949
object X {
5050
def value = new java.io.File("")
@@ -57,10 +57,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
5757
val newTpt = tpt setOriginal mkReturn(List(tpt.tpe.typeSymbol))
5858
d.copy(tpt = newTpt) replaces d
5959
}}}
60-
}
6160

6261
@Test
63-
def add_return_type_to_val() = global.ask { () => """
62+
def add_return_type_to_val() = """
6463
package add_return_type_to_val
6564
object X {
6665
val value = new java.io.File("")
@@ -74,10 +73,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
7473
val newTpt = tpt setOriginal mkReturn(List(tpt.tpe.typeSymbol))
7574
d.copy(tpt = newTpt) replaces d
7675
}}}
77-
}
7876

7977
@Test
80-
def add_return_type_to_var() = global.ask { () => """
78+
def add_return_type_to_var() = """
8179
package add_return_type_to_var
8280
object X {
8381
var variable = new java.io.File("")
@@ -91,10 +89,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
9189
val newTpt = tpt setOriginal mkReturn(List(tpt.tpe.typeSymbol))
9290
d.copy(tpt = newTpt) replaces d
9391
}}}
94-
}
9592

9693
@Test
97-
def add_override_flag() = global.ask { () => """
94+
def add_override_flag() = """
9895
package add_override_flag
9996
trait T {
10097
def meth: Int
@@ -120,10 +117,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
120117
d.copy(mods = d.mods.withFlag(Flag.OVERRIDE)) replaces d
121118
}
122119
}}
123-
}
124120

125121
@Test
126-
def add_override_final_flags_to_lazy_val() = global.ask { () => """
122+
def add_override_final_flags_to_lazy_val() = """
127123
package add_override_final_flags_to_lazy_val
128124
trait T {
129125
def meth: Int
@@ -149,10 +145,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
149145
d.copy(mods = d.mods.withFlag(Flag.OVERRIDE).withFlag(Flag.FINAL).withFlag(Flag.LAZY).withFlag(Tokens.VAL)) replaces d
150146
}
151147
}}
152-
}
153148

154149
@Test
155-
def add_override_protected_abstract_flag() = global.ask { () => """
150+
def add_override_protected_abstract_flag() = """
156151
package add_override_protected_abstract_flag
157152
trait T {
158153
protected def meth: Int = 0
@@ -178,10 +173,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
178173
d.copy(mods = d.mods.withFlag(Flag.ABSTRACT).withFlag(Flag.OVERRIDE).withFlag(Flag.PROTECTED)) replaces d
179174
}
180175
}}
181-
}
182176

183177
@Test
184-
def add_final_case_flag() = global.ask { () => """
178+
def add_final_case_flag() = """
185179
package add_final_case_flag
186180
class C(i: Int)
187181
""" becomes """
@@ -193,10 +187,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
193187
d.copy(mods = d.mods.withFlag(Flag.FINAL).withFlag(Flag.CASE).withFlag(Flag.PRIVATE)) replaces d
194188
}
195189
}}
196-
}
197190

198191
@Test
199-
def add_modifier_to_def_without_return_type() = global.ask { () => """
192+
def add_modifier_to_def_without_return_type() = """
200193
package add_modifier_to_def_without_return_type
201194
trait T {
202195
def meth: Int
@@ -222,10 +215,9 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
222215
d.copy(mods = d.mods.withFlag(Flag.OVERRIDE)) replaces d
223216
}
224217
}}
225-
}
226218

227219
@Test
228-
def add_modifier_to_val_without_return_type() = global.ask { () => """
220+
def add_modifier_to_val_without_return_type() = """
229221
package add_modifier_to_val_without_return_type
230222
trait T {
231223
def meth: Int
@@ -252,5 +244,4 @@ class ReusingPrinterTest extends TestHelper with SilentTracing {
252244
d.copy(mods = d.mods.withFlag(Flag.OVERRIDE)) replaces d
253245
}
254246
}}
255-
}
256247
}

0 commit comments

Comments
 (0)