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
Copy file name to clipboardExpand all lines: plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererConstants.kt
Copy file name to clipboardExpand all lines: plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererUtil.kt
Copy file name to clipboardExpand all lines: plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererFileContextProviderTest.kt
+4-10Lines changed: 4 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -75,10 +75,10 @@ class CodeWhispererFileContextProviderTest {
Copy file name to clipboardExpand all lines: plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererUtilTest.kt
+42-69Lines changed: 42 additions & 69 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,6 @@ class CodeWhispererUtilTest {
106
106
"""public class Main {
107
107
| public static void main() {
108
108
| }
109
-
|}
110
109
""".trimMargin()
111
110
)
112
111
assertThat(result[1].content).isEqualTo(
@@ -120,26 +119,18 @@ class CodeWhispererUtilTest {
120
119
121
120
@Test
122
121
fun`toCodeChunk case_2`() {
123
-
val psiFile = fixture.configureByText("Sample.java", codeSample33Lines.repeat(2))
122
+
val psiFile = fixture.configureByText("Sample.java", codeSample33Lines)
124
123
125
124
val result = runBlocking {
126
125
psiFile.virtualFile.toCodeChunk("fake/path")
127
126
}.toList()
128
127
129
-
assertThat(result).hasSize(3)
128
+
assertThat(result).hasSize(5)
130
129
131
130
// 0th
132
131
assertThat(result[0].content).isEqualTo(
133
-
"""|public int runBinarySearchRecursively(int[] sortedArray, int key, int low, int high) {
134
-
| int middle = low + ((high - low) / 2);
135
-
|
136
-
| if (high < low) {
137
-
| return -1;
138
-
| }
139
-
|
140
-
| if (key == sortedArray[middle]) {
141
-
| return middle;
142
-
| } else if (key < sortedArray[middle]) {
132
+
"""public int runBinarySearchRecursively(int[] sortedArray, int key, int low, int high) {
133
+
| int middle = low + ((high - low) / 2);
143
134
""".trimMargin()
144
135
)
145
136
assertThat(result[0].path).isEqualTo("fake/path")
@@ -157,72 +148,54 @@ class CodeWhispererUtilTest {
0 commit comments