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 (System .getProperty(" java.version" ).nn.startsWith(" 1.8" )) {
81
+ checkSnippet(
82
+ """
83
+ |object Main {
84
+ | type MyType = List[Int]
85
+ | def list : MT@@
86
+ |}
87
+ |""" .stripMargin,
88
+ """ |MyType
89
+ |MTOM
90
+ |MTOMFeature
91
+ |""" .stripMargin
92
+ )
93
+ } else {
94
+ checkSnippet(
95
+ """
96
+ |object Main {
97
+ | type MyType = List[Int]
98
+ | def list : MT@@
99
+ |}
100
+ |""" .stripMargin,
101
+ """ |MyType
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 (System .getProperty(" java.version" ).nn.startsWith(" 1.8" )) {
110
+ checkSnippet(
111
+ """
112
+ |object Main {
113
+ | class Gen[T]
114
+ | type MyType = Gen[Int]
115
+ | new MT@@
116
+ |}
117
+ |""" .stripMargin,
118
+ """ |MyType
119
+ |MTOM
120
+ |MTOMFeature
121
+ |""" .stripMargin
122
+ )
123
+ } else {
124
+ checkSnippet(
125
+ """
126
+ |object Main {
127
+ | class Gen[T]
128
+ | type MyType = Gen[Int]
129
+ | new MT@@
130
+ |}
131
+ |""" .stripMargin,
132
+ """ |MyType
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