File tree 1 file changed +52
-21
lines changed
presentation-compiler/test/dotty/tools/pc/tests/completion
1 file changed +52
-21
lines changed Original file line number Diff line number Diff line change @@ -77,31 +77,62 @@ class CompletionSnippetSuite extends BaseCompletionSuite:
77
77
// Dotty does not currently support fuzzy completions. Please take a look at
78
78
// https://github.com/lampepfl/dotty-feature-requests/issues/314
79
79
@ Test def `type-empty` =
80
- checkSnippet(
81
- """
82
- |object Main {
83
- | type MyType = List[Int]
84
- | def list : MT@@
85
- |}
86
- |""" .stripMargin,
87
- """ |MyType
88
- |""" .stripMargin
89
- )
80
+ if (scala.util.Properties .isJavaAtLeast(" 9" )) {
81
+ checkSnippet(
82
+ """
83
+ |object Main {
84
+ | type MyType = List[Int]
85
+ | def list : MT@@
86
+ |}
87
+ |""" .stripMargin,
88
+ """ |MyType
89
+ |""" .stripMargin
90
+ )
91
+ } else {
92
+ checkSnippet(
93
+ """
94
+ |object Main {
95
+ | type MyType = List[Int]
96
+ | def list : MT@@
97
+ |}
98
+ |""" .stripMargin,
99
+ """ |MyType
100
+ |MTOM
101
+ |MTOMFeature
102
+ |""" .stripMargin
103
+ )
104
+ }
90
105
91
106
// Dotty does not currently support fuzzy completions. Please take a look at
92
107
// https://github.com/lampepfl/dotty-feature-requests/issues/314
93
108
@ Test def `type-new-empty` =
94
- checkSnippet(
95
- """
96
- |object Main {
97
- | class Gen[T]
98
- | type MyType = Gen[Int]
99
- | new MT@@
100
- |}
101
- |""" .stripMargin,
102
- """ |MyType
103
- |""" .stripMargin
104
- )
109
+ if (scala.util.Properties .isJavaAtLeast(" 9" )) {
110
+ checkSnippet(
111
+ """
112
+ |object Main {
113
+ | class Gen[T]
114
+ | type MyType = Gen[Int]
115
+ | new MT@@
116
+ |}
117
+ |""" .stripMargin,
118
+ """ |MyType
119
+ |""" .stripMargin
120
+ )
121
+ } else {
122
+ checkSnippet(
123
+ """
124
+ |object Main {
125
+ | class Gen[T]
126
+ | type MyType = Gen[Int]
127
+ | new MT@@
128
+ |}
129
+ |""" .stripMargin,
130
+ """ |MyType
131
+ |MTOM
132
+ |MTOMFeature
133
+ |""" .stripMargin
134
+ )
135
+ }
105
136
106
137
@ Test def `type` =
107
138
checkSnippet(
You can’t perform that action at this time.
0 commit comments