diff --git a/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy b/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy index d12b60c5fd1c..40e002e5badb 100644 --- a/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy +++ b/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy @@ -14,6 +14,7 @@ * limitations under the License. */ package com.intellij.navigation + import com.intellij.ide.util.gotoByName.* import com.intellij.lang.java.JavaLanguage import com.intellij.openapi.Disposable @@ -28,6 +29,7 @@ import com.intellij.util.Consumer import com.intellij.util.concurrency.Semaphore import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.groovy.lang.psi.GroovyFile + /** * @author peter */ @@ -299,11 +301,10 @@ class Intf { public void "test groovy script class with non-identifier name"() { GroovyFile file1 = myFixture.addFileToProject('foo.groovy', '') - myFixture.addFileToProject('foo-bar.groovy', '') + GroovyFile file2 = myFixture.addFileToProject('foo-bar.groovy', '') - def clazz - edt { clazz = file1.scriptClass } - assert getPopupElements(new GotoSymbolModel2(project), 'foo', false) == [clazz] + def variants = getPopupElements(new GotoSymbolModel2(project), 'foo', false) + edt { assert variants == [file1.scriptClass, file2.scriptClass] } } private List getPopupElements(ChooseByNameModel model, String text, boolean checkboxState = false) {