File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
compiler/test/dotty/tools/dotc/plugins Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,29 @@ class PluginsTest {
150
150
assert(updatedPlan2(4 )(0 ) eq M2 )
151
151
}
152
152
153
+ @ Test
154
+ def orderingTwoPlugins4 = {
155
+ object M1 extends TestPhase {
156
+ override val runsAfter = Set (classOf [P3d ])
157
+ override val runsBefore = Set (classOfPhase(M2 ), classOf [P7 ])
158
+ }
159
+ object M2 extends TestPhase {
160
+ override val runsAfter = Set (classOf [P3d ])
161
+ override val runsBefore = Set (classOf [P5 ], classOf [P8 ])
162
+ }
163
+
164
+ // M1 inserted to plan first
165
+ val updatedPlan1 = Plugins .schedule(basicPlan, M1 :: M2 :: Nil )
166
+ assert(updatedPlan1(6 )(0 ) eq M1 )
167
+ assert(updatedPlan1(7 )(0 ) eq M2 )
168
+
169
+ // M2 inserted to plan first
170
+ val updatedPlan2 = Plugins .schedule(basicPlan, M2 :: M1 :: Nil )
171
+ assert(updatedPlan2(4 )(0 ) eq M1 )
172
+ assert(updatedPlan2(5 )(0 ) eq M2 )
173
+ }
174
+
175
+
153
176
@ Test
154
177
def deterministic = {
155
178
object M1 extends TestPhase {
You can’t perform that action at this time.
0 commit comments