You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: test for kotlin sdk and jdk classes to verify that it works
103
+
@Test
104
+
fun`should find members in jdk object`() {
105
+
val result = languageServer.getProtocolExtensionService().overrideMember(TextDocumentPositionParams(TextDocumentIdentifier(fileUri), position(39, 9))).get()
106
+
107
+
val titles = result.map { it.title }
108
+
val edits = result.flatMap { it.edit.changes[fileUri]!! }
109
+
val newTexts = edits.map { it.newText }
110
+
val ranges = edits.map { it.range }
111
+
112
+
assertThat(titles, containsInAnyOrder("override fun equals(other: Any?): Boolean { }",
113
+
"override fun hashCode(): Int { }",
114
+
"override fun toString(): String { }",
115
+
"override fun run() { }",
116
+
"override fun clone(): Any { }",
117
+
"override fun start() { }",
118
+
"override fun interrupt() { }",
119
+
"override fun isInterrupted(): Boolean { }",
120
+
"override fun countStackFrames(): Int { }",
121
+
"override fun getContextClassLoader(): ClassLoader { }",
122
+
"override fun setContextClassLoader(cl: ClassLoader) { }",
123
+
"override fun getStackTrace(): (Array<(StackTraceElement..StackTraceElement?)>..Array<out (StackTraceElement..StackTraceElement?)>) { }",
124
+
"override fun getId(): Long { }",
125
+
"override fun getState(): State { }",
126
+
"override fun getUncaughtExceptionHandler(): UncaughtExceptionHandler { }",
127
+
"override fun setUncaughtExceptionHandler(eh: UncaughtExceptionHandler) { }"))
128
+
129
+
val padding =System.lineSeparator() +System.lineSeparator() +""
130
+
assertThat(newTexts, containsInAnyOrder(padding +"override fun equals(other: Any?): Boolean { }",
131
+
padding +"override fun hashCode(): Int { }",
132
+
padding +"override fun toString(): String { }",
133
+
padding +"override fun run() { }",
134
+
padding +"override fun clone(): Any { }",
135
+
padding +"override fun start() { }",
136
+
padding +"override fun interrupt() { }",
137
+
padding +"override fun isInterrupted(): Boolean { }",
138
+
padding +"override fun countStackFrames(): Int { }",
139
+
padding +"override fun getContextClassLoader(): ClassLoader { }",
140
+
padding +"override fun setContextClassLoader(cl: ClassLoader) { }",
141
+
padding +"override fun getStackTrace(): (Array<(StackTraceElement..StackTraceElement?)>..Array<out (StackTraceElement..StackTraceElement?)>) { }",
142
+
padding +"override fun getId(): Long { }",
143
+
padding +"override fun getState(): State { }",
144
+
padding +"override fun getUncaughtExceptionHandler(): UncaughtExceptionHandler { }",
145
+
padding +"override fun setUncaughtExceptionHandler(eh: UncaughtExceptionHandler) { }"))
0 commit comments